If you have a mac you can make a custom 2.2.1 ipsw with pwnage tool (google the iphone dev team). Then you can update the firmware while still having the ability on unlock. In the process you will remove all the old data and start with new software. Once you finished your phone will be jailbroken, then open up cydia, add the yellowsn0w source and install yellow snow, then your phone will have the newest software, be jailbroken, and unlocked! Good luck!