Not uncommon for door locks to get jammed when tiny bits of dirt/grit get into them, usually transferred via the key (which you should actually clean every once in a while if you have this problem). I've had it happen every once in a while and I used to use WD40 (which always worked) but I've since learned you should use the graphite WD40 (grey can) as the WD40 actually ends up being sticky and attracting more dirt.
Before you invest in a big change, maybe try the graphite WD40 spray. May fix your problem for less than $10.