We had the same problem, the micro switch that you press to open the boot gets moisture in it and basically causes it to do as you said.
nissan wanted like 80 quid to fix it but i just went to maplin and bought a micro switch for 89 pence, what you need to do is take the boot handle off, first you have to remove the back panel inside your boot and it should expose the bolts for holding it on, first thing to do is make sure its the switch thats damaged, pull out the electrical connector from the component and just cross the connection on the wire with a screwdriver or something and you should hear the boot locking mechanism activate.
next you have to remove the microswitch, take the microswitch to maplin and find something close to its size and then you just have to mount the new switch inside the box, i had a little trouble here but managed to secure it quite nicely after a bit of tweaking, next thing you wan tto do is water proof the area and then reinstall and you should be done