I reach through the bars and pull the key from the lock as well, then throw it across the room out of my reach so that it looks as though I had no choice but to stay in here.
I would have shut the door but left the key in, just to let them know I COULD have walked out, I CHOSE not to.