I recently purchased an iPhone off ebay that was on firmware 3.0.1 and never updated. Hopefully this means that it still have the same original baseband... or at least I think that's what it's called. I need the phone to be unlocked so I can use it on tmobile. So I wanted to ask...

What is the best way to jailbreak and unlock this iPhone? Will I be able to update to the latest firmware and keep my unlock? I receive my iPhone in the mail today and I want to be prepared. If you have any questions, please feel free to ask.