There's an app called autolock that will automatically lock your BB with a set timeout period.
I just use the Mute key at the top of the BB to put the BB in Standby Mode. It locks the keypad, plus it saves on battery power while still allowing phone calls, messages and alerts to come through.
Posted from my CrackBerry at wapforums.crackberry.com