Thanks to JohnE for submitting these instructions
Unscrew the nut to remove the metal catches inside the locker door to allow the lock mechanism to be removed.
The metal barrel has a guide slot along one side and a smaller square hole on the other. Inside that hole is a small woodruff-type key held in with a spring. When locked, this key pops out of the recess to hold the handle in the locked position.
When you turn the lock's key (to unlock it), the woodruff moves into the barrel enabling the handle to pop back out again.
With wear and dirt ingress, the woodruff isn't sufficiently free to pop out into the locked position as it should.
This can be remedied by withdrawing the lock mechanism from the barrel, and using a three-square needle file, smoothing any burrs from the top and side edges of the hole just enough to enable the woodruff to pop in and out freely. The top edge of the hole may need up to 1/4mm taking off to enlarge it enough to ensure the mechanism operates smoothly.
After the lock's been reassembled and back on the door, lubricate with a little graphite-based lubricant - I use Ambersil Lock Lube.
Don't be tempted to spray any of your external caravan locks with WD40 - it can cause the plastic parts to swell, making a difficult lock even worse.
Just be careful you don't lose that tiny spring.