Or you give the kid the key to hold for a while, strap him in the seat, close the door to go to the driver seat, kid presses the lock button and throws the key away.
That was a horror scene while in holidays with another couple. Fortunately somebody arrived to help without having to break the glass.