Turn engine off, key out ignition. If you can select/deselect gears now then your looking at a clutch/flywheel problem. 40,000 miles isn't a lot, but depending how you and the previous owner drives can fuck the clutch. It doesn't take a lot to fuck a clutch.
If you still can't select/deselect gears then your looking at a potential gearbox/linkage problem. Don't be surprised if the box is fucked at such a low mileage. I've changed about 8-9 gearboxes in 2010 onwards Vauxhall Astras with mileages ranging from 15k on. The quality of new cars these days is shocking.
Odometer resetting is likely just a coincedence. No way the problem will be down to electrics of the gearbox as the only electrical side to a manual gearbox is a reverse sensor usually and even if this went faulty it would not cause anything like this you just wouldnt get reverse lights.
Do yourself a favour and avoid main dealers. Take the car to a few back street garages, get them to diagnose and quote the problem then pick the best. Might cost you £10-£20 for an hours labour/diagnosis but it will save you a fortune in parts and labour compared to Ford!