Many, many years ago (long before I got married) I didn't just lock a key inside (which I certainly also have done), I lost a key, which created an interesting experience going through Canadian customs. My brother, a technical whiz, won a picture tube-changing (remember picture tubes?) competition put on by Zenith. His prize was a paid trip for two to the Bahamas, and, since we were both unattached at the time, he took me.
When we got to our hotel room in the Bahamas, I couldn't find the key to my locked suitcase. My brother, who had packed a flexible belt of tools, said "No problem, I'll pick the lock." And he did. After packing up at the end of our stay, I asked my brother "Can you lock my suitcase with your tools?" He replied "Yes." And he did.
I arrived back at Toronto airport with a locked suitcase an no key. My brother and I were separated into different areas of the airport. After a while, I realized that people in my line were being reunited with their luggage in the presence of customs agents, and that the customs agents were opening and searching all luggage items. When my turn came, i explained that I had lost the key to my suitcase.
"You mean to tell that you spent your entire vacation without opening this suitcase!"
"No. my brother picked the lock."
"Where is your brother?"
"I don't know. He didn't get put into this line."
A custom agent was assigned to me, and we found and brought back my brother. After my brother picked the lock in front of both agents, they made a cursory search of my suitcase, and they let us proceed.