I tried updating my iPhone, but now it says "SIM is invalid"
This means that the phone was software unlocked (which requires a jailbreak). Because you updated the device using iTunes, you have removed the jailbreak and the phone is no longer in a state of carrier unlock. This is actually common practice and a great number of people end up getting burned (they either just don't know better or are lied to and told the phone is factory unlocked).

You can call the carrier the phone is originally locked to and have them unlocked it (they may charge a modest fee or if you luck out, do it for free as that particular model no longer being manufactured) or re-jailbreak the device and software unlock it yourself, provided you have a baseband revision of 06.15.00 or older.

Note: Apple can't help in these matters.