wow! I had just tested a new thing.
If you disable "change my status" in Messenger Lock options, and write "/away" in "send a message to open chat windows" in 'Options when locking Messenger' and then lock your messenger, it will automatically set your status to Away. And when you unlock, your status will remain as away.
But it is important to have an open chat window when locking messenger!!!