Thumping the door or using lock de-icer won't work - and is impossible anyway if you are locked inside, as I was. I suspect an electrical problem, it just has a mind of its own sometimes.
When I got the problem both driver's and passenger's doors were locked, the handles would not release outside or inside. It has been OK since Xmas, but I am not just keeping my fingers crossed, I now carry an emergency hammer gadget as insurance against being locked in again.