I am happy to hear it all worked out, I had a couple of similar things like that happen over the years to me, recently, it was wee hours in the morning/late nite, below zero, didn't know my husband had locked the back door when we were away earlier that day, everyone's asleep, I'm out with the dogs, having my smoke, go to come in and, door locked, no backdoor doorbell (will get one soon) both gates are frozen shut, so I couldn't open them and go to the garage and come in house or go to front and ring doorbell, now even worse, I'm in my niteshirt with my coat over it.
Strange thing, I do not remember, but I did find a spot in the snow to climb over the fence,naturally bruised and cut myself doing so. Besides panicking I may die right in my own yard, I was afraid for my dogs, they were freezing, scratching the glass door. Well needless to say I am always checking that the button isn't turned in the lock position.
Oh quite of few locked in and out of places.
I know how scared you must of been, I broke down in tears in some other incidents.
Gotta run,
Happy you are safe