In order to repair your power/lock button, volume controls or silent ringer switch you will have to disassemble your iPhone 5 and remove the battery and logic board. This is an advanced level repair and can be risky for those who lack experience with cell phone repairs. If you have any doubts about your skill level it is probably best to leave this repair to a professional. The replacement part is relatively inexpensive but the labor involved is considerable. You can purchase the replacement part through the link below.
In this video I will demonstrate how to remove and replace the main flex cable for an iPhone 5. This will restore functionality to your power/lock button and also replaces the controls for your vibrator and volume up and down controls. In rare cases one of the above may cease to function for a different reason so be sure to test the functionality of the replacement part before performing the entire process. This will save you a lot of time if your problem has nothing to do with the flex cable. In most cases though this is the culprit.