The best time I got locked in was years ago, when I worked for a cleaning company.
At the end of the night the entire crew was moving our stuff out. We had to exit through a long hallway that was compartmentalised.
Although we clearly mentioned that our work would take until after midnight they set the badges (electronic locks) at 0:00.
So when we were moving through we all got locked in a compartment. Like mice in a lab.
Took over two hours for someone to come and release us.
Luckily I had my backpack with me with something to eat and drink.
Ah well, at least I got paid to sit there