As long as you have not unlocked it to work with a non-AT&T provider, it is simple to restore/upgrade it to 1.1.1 and then jailbreak it. I did it yesterday in about 3-5 minutes. It was so simple I smack myself around for not doing it earlier.
As long as the phone is not unlocked to work with a provider other than AT&T it is simple to upgrade and jailbreak the phone. You just do a complete sync to ensure you get all your data off the phone. I uninstalled all my extra software but I am not sure whether that is required. I did it just to be safe. I did an upgrade and after a minute or two it was at 1.1.1. I then went to the jailbreakme site and clicked the button. I went outside to have a smoke and when I came back in my phone was sitting there all done and jailbroken. Swiped my finger and there on my phone was installer ready and waiting for me. So simple.
I have not unlocked a phone or worked with an unlocked phone but from what I have read on this forum there appears to be a way to get it done but it is very dangerous and complicated with the risk of bricking your phone in the process.
If you upgrade the unlocked phone you run the risk of making it no longer work. It can be done but I have not done the steps involved so can't give you any guidance on that. There are a lot of discussions on this forum on the process. I suggest you search for them and read them thoroughly before you do anything on your own phone. Make sure you are completely comfortable with all the steps before starting or you will be back on here yelling help, I have a brick.