Actually (blush) I've done the same thing with my ancient but dependable 1997 Ford F-150 pickup here in the U.S.
On a recent exceptionally cold morning I parked by trusty (only 67,000 miles on odometer) steed and exited to plug in the block heater and when I returned to the cab... lights on, engine running... doors locked, I had to call Mrs. C. to bring a spare key (which I've since fitted to an under wheel-well, hidden device).
Not being especially swift, I figured out that the pick-up is equipped with electric door locks, and a switch mounted on the left arm rest will lock all 3 doors if unitentionally pushed. Getting out that below zero (F) day in heavy parka, I managed to brush the switch unknowingly and locked the doors. It's now on my checklist...