Iphone Unknown Error 40 stuck in recovery mode

My question is... if my iphone is stuck in recovery mode and I return it to the shop I bought it from and they give me my money back/replace it etc, if they then do get the phone to work will they be able to see all my data/photos/messages etc? Or will it only restore personal data if the phone is restored from my itunes?
I updated my Iphone 4 via Itunes yesterday and it's now stuck in recovery mode, every time I try to restore the phone it gets to "waiting for iphone" then Unknown error 40 appears.
I have tried the suggestions here:
I am going to take it to the apple store genius next week, but first am returning it to the shop I bought it from as they want to see if they can fix it (it was unlocked when I bought it, they claimed it was an apple unlocked phone but I am concerned it was in fact unlocked by them and this is why I am having problems).  Hence my question being, will they be able to restore it to my data without access to my itunes to back it up from?  Will it just be a factory setting reset if they fix it (which I'd prefer)?
Thanks in advance!

Hi Fkaram,
Sorry to say I haven't found a solution (after hours of searching!) and have bought an android moto g. The only difference from yours is that I replaced the dock connector as I kept getting error 4014, which turned it on after being off for three weeks, and then went to error 40.
If you haven't got a warranty, I can only suggest replacing the dock connector. Its cheap (£5) and pretty easy to fix. I only tried this because changing the leads didn't work, but I kept getting the faulty leads error (4014+40)
Good luck!
ps - check for any bent pins or if there is a red/coloured light in the connector itself. I didn't see any bent pins so was lucky the replacement actually did something
Message was edited by: Harry Jones3