You might want to try putting the phone into DFU mode and try restoring again. Since the DFU restore removes both the software and firmware from the phone, it can remedy the situation you are in.
This link may also give you other troubleshooting tips and more info on that particular error code:
To put the phone into DFU mode:
1. Make sure the phone is connected to the computer
2. Hold down the sleep/wake button and home button at the same time for 8 seconds
3. Let go of the sleep/wake button and keep holding down the home button
4. If you are successful, a dialog box will pop up in iTunes stating that iTunes has detected an iPod/iPhone in recovery mode.
5. Click OK, then click the restore button in iTunes.
Hopefully after that you will be able to resync your data and be good to go!
Hope this helps!
The only other thing I can think of to try before having it replaced is to remove the software .ipsw file from your computer so iTunes will download another one and then DFU restore the phone again.
If you are using a Windows machine the .ipsw files can be found here:
Windows XP: \Documents and Settings\username\Application Data\Apple Computer\iTunes\iPhone Software Updates. You can delete whatever files are in the folder
Windows Vista & Windows 7: \Users\username\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates. You can delete whatever files are in the folder
If you are using a Mac the files will be in either of these two locations:
User/Library/iTunes/iPhone Software Updates. You can delete whatever files are in the folder
User/Library/Application Support/iTunes. You can delete whatever files are in the folder
After deleting those files put the phone in DFU mode and restore. It should prompt iTunes to download a new version of that software. If this doesn't work then you should contact AppleCare or your nearest Apple Store/Apple Authorized Service Provider to have the phone replaced.