An electric switch would be a good approach. My elderly Audi A6 has an electro-vacuum diff lock on the rear axle. It disengages automatically above 5mph. You could think up a threshold of some type that would be applicable to a lawn mower but I think I'd just put a very bright warning light on the dash to remind me. It doesn't seem like the sort of thing to be forgotten, since, because the driver is concerned about traction/ being stuck, he's focused on getting out. I'd be interested though if someone thought up a useful disengage threshold