You can unlock keychain with the following Terminal command:
security unlock-keychain -p "[Keychain Password]" "$HOME/Library/Keychains/[Keychain Name.keychain]"
Replace [Keychain Password] with your keychain password, and the [Keychain Name.keychain]with your keychain name, such as "login.keychain"