@ all_aglow: I like the idea that it was the Mad Hatter who put the key there. He seems crazy and cunning enough to do it. Perhaps he planted the key in the cell, waited for MM to exit, abducted MM outside the sheriff station, and is waiting for Emma to come searching so he can kidnap her, too. Only someone as crazy as the Mad Hatter would be daring enough to abduct law enforcement.
"That’s how you know you’ve really got a home. When you leave it, there’s this feeling that you can’t shake. You just miss it." Neal Cassidy