Yo OP!
Please elaborate.
Not locking, with the key in the door? Got the right keys? Not bought an iffy motor?

Not locking, from remote? Is it trying to lock and not working - tried the key battery?
A new set of keys/barrels from VW would write your car off. Another set of keys won't correct crazy central locking. However a complete set could be had from a breaker and changed out. You'll also of course have to change the ignition barrel to have a matching set and reprogram the immobiliser! There's some other things to verify first....
Central locking gremlins are normally due to faulty micro-switches confusing the central locking system into submission. Once in a blue moon someone mentions the CCM being at fault.
>99.9% sure the door locks playing up will be the micro-switches within the door lock modules. Work out which module is playing up (Are the door puddle lights coming on when you open the doors), replace and then de-lock the doors.
>99.9% sure the boot lock playing up will be water ingress from leaky washer jet and the barrel will also probably be seized from lack of use. Replace the wiper motor and boot latch unit. You'll likely want to replace the rotten handle too.