The key was in the lock.
There was a lock, but the key was already in it.