was the car fired up?
i did something like this... unlocked the car, chucked the keys on the drivers seat, popped the bonnet, shut the door, checked my levels, then went for the door and it had locked. at the time i didn't have the spare key at the address, so had to call out my breakdown...