How did you try to unlock it? A lock is usually a software feature. Did you try to hit it with a hammer?
Read the warranty terms. Accidental damage or tampering with the device is not covered.
Service and Repair - https://selfsolve.apple.com/ - Repair options (requires hardware serial number)
Service Answer Center - iPhone - http://support.apple.com/kb/index?page=servicefaq&geo=US&product=iphone <-- enter correct country once on page.
The problem is not with hardware. It's with software. When I was trying to follow the instructions on-line how to unlock the iphone 3 gs, iOs 5.1, my iphone stopped working and now I can't resore od download any siftware from iTunes. Is it possible to fix it or replace? I bought it something like two weeks ago.
iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting - http://support.apple.com/kb/HT1430
iOS: Not responding or does not turn on - http://support.apple.com/kb/TS3281
iTunes: Backing up, updating, and restoring iOS software - http://support.apple.com/kb/HT1414
iOS: Unable to update or restore - http://support.apple.com/kb/HT1808 - recovery mode (e.g., cannot connect to computer last used to sync device)