About 4-5 years ago, marriott in suburban chicago. I got back to my room after a day of work and the card didn't work. Down to the desk, got a new card, that didn't work either. They sent someone up with me, they couldn't get in.
Meanwhile, my poor dog has been waiting for me in the room all day, probably needs to pee, and hearing us in the hallway, is gently pawing the door - "let me out".
Turns out the batteries inside the door that power the lock had jiggled loose. They sent me to the hotel bar for a complimentary drink, and about 20 minutes later, they succeeded in opening the door.
I figure, cr-p happens, no one's fault, they handled it well, my opinion of the hotel was not damaged.