Are the symptoms NOT locking?, or is the car locking then unlocking itself? .
IE- you press the lock button but the car indicators flash TWICE to indicate UNLOCKED?.
If its the doing the later! then this is known to happen if the internal door handles is stiff and"binding" if you think this might be the case then remove the chromed plastic cap/cover from the handle and spray some release fluid such as WD40 or the likes over the moving parts! (pivot point&pin,rods etc!) and work the handle back and forth many times to free it up so it moves easy without binding up! before refitting the chrome cover you can shut the door and try the fob again! to see if it works!. this is most likely to effect the drivers door but could effect either or even both!.
If however when you press the lock button on the fob the indicators only flash once to show locked!, but the system has NOT actually locked the car then you have a different problem!.