Suspension fork - Can you leave them locked for a long time?
Without knowing more details about the fork (coil spring vs air spring) it is hard to recommend anything other than getting it serviced at your LBS.

With that said I know on my MTB with fox float forks, that if I leave it upside down for a while it won't lockout properly. Usually because the oil has displaced within the chamber.

Maybe try flipping it upside down overnight and then seeing if that helps.