My iphone 4 randonly won't turn on?

My iPhone 4 lock button is broken its always been that way as I bought it second hand it's never been a problem cuz I had accessible touch until today it was about 50 percent power if not more and I was using it while I was at work when I went to look at it while texting and it suddenly was off I just didn't think it was a problem and Pulged it in and usually turns it on but when I went back to look at it was still off. I tried Plugging it into my computer to restore it computer did not register that I was there I tried plugin it in foir about 30 minutes. Pressing the home button for thirty seconds and it still not responding does anyone have any ideas

It sounds like it is broken. I powered my iPhone off and tried holding the home button and nothing happened for me either. But when I connect it to power, it turned on again. As long as your phone is charged some (and you said you charged yours for 30 minutes), when you reconnect it to a power source, it should turn on.