By default GTA:SA settings, the lock key will be 2 on the keyboard. The name for this key inside the GTA:SA key configuration is: "Sub-Mission"  The lock key is used to toggle the lock status of the vehicle you're in, when you exit the vehicle the doors will automatically unlock to save you from the embarrassment of locking yourself out!