Home screen button and Lock button on iPhone 4 not working

Just this morning, my iPhone home button and lock button quit working. I'm stuck on the settings app, I can't get out. What do I do?
It's been like this for about 1 hour now, the 3 button change colour thing is working, and the screen shot is working.

This happened to me, slam your phone on the table i know it sounds weird but Iphones have gears in them which can get displaced, and the only way to fix it is to slam your phone

Use assistive touch

Just try pressing the home and power button simultaneously for 15-20 secs it will perform a hard reset no loss of info. It should work

Hold key and shut of your phone than you can also reset your phone.

if phone dosent react than you can do it with your pc.

Go to general, accecibility and then turn on assistive touch. You can use this as the home button and all the other keys by clicking the button that should appear when you turn it on