You have two options: upgrade to 3.1.2 stock then jailbreak with blackra1n and unlock with blacksn0w. Or upgrade with a custom 3.1.2 ipsw made with PwnageTool and then unlock with ultrasn0w. Both should work, but be aware that a minority (10-20%) experience periodic problems with WiFi when using blacksn0w to unlock. Read the sticky threads, and if you still have questions let us know.