Usually this is a problem with the vacuum system.
Did the car was standing still for a long period of time? Or, did you manipulate the locks a few times with the engine off?
Try running the engine for a while and operate the locks and see if they work properly. If they do, you could have a small leak at one of the vacuum hoses that lets the air bleed while the car is stopped. Also check if it is the driver's door contact. Just operate the central lock system from the passenger's door or the trunk.
How to fix it? Well, if it is a leak at one of the hoses, it is easily fix. The problem is finding the leak (very time consuming!). Usually, sections of the vacuum system are tested with a vacuum pressure monitor. If at one section the pressure drops fast, there is your leak. Make sure also that there are no loose vacuum hoses in the engine compartment!