It was actually difficult to identify the sound. There was a sound of the drive train binding causing the wheels to slip and that's not unusual even without a locker.
There was a ta-ta-ta-ta-ta sound in there as well, somewhat metallic - now that could have been a few different things.
* Transfer case chain. Unlikely unless the car's been driven a lot on firm surfaces in 4WD. The chain stretches and eventually the slack side taps away at the housing.
* Transfer case output bearing. Not as rare as we'd like. The seals go, dirt gets in and the inevitable happens. Inspect and check the drive shaft ends for play. Note that in the D40, the front drive shaft turns over whether the car is in 4WD or not, but there's no pressure. With the car up on a hoist with the wheels free (chassis lift) and the engine off you'll hear it. You can also grab the drive shaft and shake it - either the uni will flop or the end shaft will flop.
* Front drive shaft uni joints. Common. They're exposed. The more dirt/sand driving you do the more the risk. Easy to diagnose, as above.
* CV joint. Not common. If the CV boots are cared for, they're pretty hard to kill, although lifting a front wheel and allowing it to spin just as it drops and bites is a surefire way to kill the CV, the front axle or the diff itself. Hoist as before, turn over each of the front wheels while listening to the CV area.
* Front diff. Not common. They're a light duty diff, the previously mentioned wheel lift can destroy them. Examination on a hoist is necessary, a mechanic's stethoscope is useful. If the diff is fitted with an auto locker it may just be the auto lock engaging and disengaging, don't mis-diagnose a failing diff from the auto lock mechanism.
* Front wheel bearing. Common. 4WD or 2WD doesn't really matter, but 4WD puts more strain on it and makes it easier to hear. Easy diagnosis too (in 2WD). Find a nice smooth corner that you can take at about 50-60 km/h in both directions without tearing up the tyres (eg a 55km/h corner taken at 60km/h). Listen carefully to how the car sounds in the left hand corner, then turn around and do the corner the other way and listen again. If the car makes more noise in the left hand corner, the RIGHT front wheel bearing is shot. Vice versa for the other. My own car did this, but I don't recall hearing a ticking sound in 4WD at low speeds, mostly because I only engage 4WD in slippery situations or when wading at hub-deep or higher (and good luck hearing anything when the wheels are under water).