i got my iphone 3g from ebay ( US jb version) and now the firmware of the phone is 3.0.1. and i'm at New Zealand using Vodafone network. How do I update my iphone 3g to 3.1.1 (prevent locked)

many thanks!