Door lock

I own a 2001 Lexus IS300. When I click the open door button on my key to unlock the door, it unlocks and then it locks. I can try it again about 3 or 4 times before it remains unlocked. Then after I start to drive it locks again. Sometimes when I click the button, it locks and unlocks nonstop for a few seconds. The battery has been changed in the key. Help.

This is almost certainly in the car, not the key. The lock controller may be bad, or there may be pinched and shorted wiring going to the door(s). The lock switch in the car that locks all the doors may be stuck. Some cars also automatically lock all doors when the car starts moving . . . that’s supposed to be a feature.