So I guess my recommendation of a well placed brick through a window won't be needed.
My suggestion was going to be "open the door", to be an equal smart-ass. Turns out that was the right answer. Weird.
But seriously, this is one of those topics that comes up from time to time and it's probably worth repeating... develop good habits. First, I almost
never put the keys down inside the car. If I'm working on some interior mod etc, the keys stay in my pocket, or outside the car. That's an easy rule to generally
abide by. But here's the biggest rule. Never
lock the car except using the keyfob, while all doors are shut. Ever. If you have to use the keyfob to lock the car, it'll never get locked inside. Don't ever
use the lock buttons inside the car. Just don't. Ever. No, not even then. If you're cleaning the car and accidentally hit a button, immediately unlock it again. Not to beat the point to a pulp, but this is a habit we need to follow like religion. Thou shalt not.