Taken from the T4R 4th Gen owner's manual which was found on the forum:
-Automatic door locking and unlocking functions
You can set the following automatic door locking and unlocking functions.
(a) Locking linked with the shift position
All the side doors and back door are
locked automatically when the automatic
transmission selector lever is moved out
of the “P” position with the engine running
and all the side doors and back door are
closed. This function is the default setting
for new vehicles.
(b) Unlocking linked with the shift position
All the side doors and back door are unlocked
automatically when the automatic
transmission selector lever is moved to
the “P” position with the ignition switch in
the “ON” position.
(c) Locking linked with the vehicle speed
All the side doors and back door are
locked automatically when the vehicle
speed reaches 20 km/h (12 mph) or higher.
However, if any of the side doors and
back door is unlocked during driving, this
auto locking function will not operate until
the unlocked door is opened once.
(d) Unlocking linked with opening the driver’s door
All the side doors and back door are unlocked
automatically when the driver’s
door is opened within 10 seconds after
the ignition switch is turned from the “ON”
to “ACC” or “LOCK” position.
SETTING THE FUNCTIONS
1. Close all the side doors and back door.
2. Turn the ignition switch to the “ON” position.
3. Within 10 seconds after the ignition switch is turned to the “ON” position;
To set function (a)
Push and hold the front of the power
door lock switch for 5 seconds with the
automatic transmission selector lever in
the “P” position.
To set function (b)
Push and hold the rear of the power
door lock switch for 5 seconds with the
automatic transmission selector lever in
the “P” position.
To set function (c)
Push and hold the front of the power
door lock switch for 5 seconds with the
automatic transmission selector lever in
any position except “P”.
To set function (d)
Push and hold the rear of the power
door lock switch for 5 seconds with the
automatic transmission selector lever in
any position except “P”.
All the side doors and back door are automatically
lock and unlock when you release
the power door lock switch. This
indicates that the function is set. If all the
side doors and back door do not lock and
unlock, the time the switch was held may
have been too short or too long. Perform
the procedure over again starting from
step 1.
If you want to cancel a function, repeat
the procedure. Each time you perform the
procedure, the function is set or cancelled.
Source:
http://www.toyota-4runner.org/4th-gen-t4rs/41015-owners-manual-pdf.html