Is it better to go to at&t or apple?

My lock button on my iphone 4 doesn't work and my home button goes on and off randomly sometimes. I was hoping to get a new one for free or really cheap just to replace it. Would apple or at&t give me a better deal for my phone?

Talk to Apple, way better customer care. They may even fix your current phone.

Check this option (if not started yet then it will be soon):
Apple is reportedly set this month to launch an iPhone trade-in program. Sources with knowledge of the plans claim Apple has joined forces with Brightstar Corp, which handles trade-ins for carriers AT&T and T-Mobile, among others, to helm the program, which will reportedly be available at Apple's brick-and-mortar stores. The plan, according to Bloomberg's sources, will be to let iPhone 4 or 4S owners exchange their devices for cash toward an iPhone 5 on-site.AT&T already offers up to $200 for operating iPhone 4s and 4Ss.

Well it looks like you are looking to get a repair. Apple Store. Don't think you'd get a replacement for that simple a problem.