Welcome to Android Central! I think you have bigger problems than figuring out how to lock the phone, if the Power button is broken. You won't be able to power down, and if the phone somehow powers down on its own (e.g., if you run out of battery), you won't be able to turn it back on. I'd look into getting that power button repaired. You're probably still under warranty, right?