with central locking its quite common to only have one keyhole for emergency use.
Hopefully a quirt of wd 40 ,a bit of a clean up of the key (the buttons can get a bit mucky) and a new battery will do the job. (but also check for any corrosion on the battery contacts)
If the key is knackered I think they can sometimes reprogramme the new key to the same security code for the central locking vhf transmitter. . There is also a transponder chip in the key. It doesnt need a battery. When you use the key to switch on the ignition the car sends a radio signal to the key which acts like an antenna ,and returns a coded security response. Just like security tags to enter buildings, credit cards etc. This chip may be reprogrammable, or they might simply transfer the chip from the old key to the new one.