Hello and welcome to Just answer.com, Super mechanic here. About your vehicle.
That sounds like the solenoid is sticking when it's cold. Here is a desription of it and the location if it.
Brief Description, Gear Selector Mechanism The gear selector is used to select the desired gear (P, R, N, D or M). The movement of the gear selector is conveyed by a wire to the gearbox. The gear position sensor is integrated in the control module, which is mounted directly on the gearbox.The gear selector lever acts not only on the gear position sensor but also the manual shift valve in the valve housing.The selector lever housing contains the following blocking functions: Park Brake Shift-lock and gear position detent. The Park Brake Shift-lock function means the brake pedal must be depressed and the ignition key must be turned to OFF or further before the gear selector can be moved away from the P and N positions. This function is controlled by the Shift lever module (726), which acts on a solenoid. The solenoid blocks the mechanical gear selector segment if it is not activated. REC sends the status of the brake light and SLM uses the value to activate the solenoid to release the block on the gear selector segment.To release the Park Brake Shift-lock in case of an electrical fault, proceed as follows: Press a screwdriver or similar into the hole in front of the lever housing and move the lever.The gear position interlock function prevents the lever from being moved from P to R, D or M without first pressing the release button on the front of the lever. The interlock also prevents the lever from being moved from N to R and from R to P.