This question already has an answer here:

My lock screen button on my Lumia 925 stopped working recently. Unfortunately I need to restart it quite often so I would need an alternative way of turning it off. Anyone knows how to restart it without using the lock screen button or a way on how to fix it?

marked as duplicate by Thomas, Neil Turner, caschw, Vitor Canova Jun 15 '15 at 15:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.