If you can find a replacement for the sensor circuit board, and solder it in, that will probably work.
However it is likely to be very difficult to find a circuit board as a spare part, or even a circuit board with a sensor that fits the housing and has the right connections.
There are lots of stand-alone sensors in their own housings that are mains powered and have a mains-voltage output, so it is easier to buy one of those, and fit it separately and connect the lamp via that. The only modification you need to do to the lamp is to make it turn on whenever it has power.