To lock the phone, you can hold down the 'red handset key'.
Unfortunately, this has the side effect of disconnecting GPRS. So, you cannot stay online to messenger etc. and lock the phone using this method.
Lock the phone by tapping the power button, and selecting the appropriate option.