It could also be a faulty door catch causing the locking and unlocking behaviour. A fault code is recorded for this and is something like "door won't de-safe". I had the same noise for about 12 months, first it was intermitant, then it was every time, then the car didn't know when the rear door was open!! Replaced the door micro switch / catch (£150 at a local VAG specialist) and the noise has never reappeared. Try opening the doors one at a time and see if it registers on the dash display, oh and try and get a fault code download, this will help a lot.
Cheers,
David