After surfing around websites and forums most of the last few days, I'm now thoroughly confused on a solution for this!
So asking for some help please.

I jailbroke and unlocked my 3GS some two years ago. I can't recall which method I used at the time for the jailbrake and unlock - too long ago :-(

The 3GS is on iOS5.0.1 (9A405) and the firmware is 05.13.04.

What would be the best path and method to upgrade to a more recent iOS, say 6.x something whilst retaining the unlock.

I'm not fussed about remaining Jailbroken as long as the unlock stays to allow any UK carrier SIM to be used. I'm as I'm passing down the family, don't mind if the phone is refreshed and loses data (in fact that's good :-). If accepting the iTunes upgrade to 6.1.3 keeps the unlock but is un-jailbrakable - thats probably okay. I've just read so much about 6.1.3 that I don't wish to make a wrong move.

In case it's important - the iPhone was originally a US AT&T locked iPhone. I had to jailbrake to unlock it after returning to the UK to live.

much thanks for any help.