There are actually two prepositional phrases in this sentence: “in the lock” with the preposition “in” and “to the front door” with the preposition “to”. However, both of these prepositional phrases serve similar purposes despite their relationship to different subjects. The first phrase, “in the lock”, tells the reader the position of the key. The second phrase similarly tells the reader where the dog is dashing to. Therefore, your answer is that the prepositional phrases are being used to indicate specific locations.
Hope this helps!