Tommy heard the sound of the key being turned in the lock.
Tommy heard the sound of the door being unlocked.