K40 limit switch issue

My K40 was working perfectly until for no obvious reason the Y limit switch failed, X axis homes, then the Y rail crashes into the back of the machine. I have reseated all the cables, removed the sensor board (optical slot type) cleaned it and re soldered all the pins, no change. Does anyone know where I can buy a replacement board without paying a fortune or waiting months for delivery to the UK? (I found one on Ebay shipping from Australia costs £32 - insane for a £2 sensor and a resistor!)
suggestions please!

Most folks replace them with mechanical switches when the optical ones fail.

Weird thing is, it suddenly started working again, no idea why, nothing changed it just fixed itself! (maybe it was tired and needed a bit of a rest!)