On the front page of cydia, if you see 4.0 shsh , then you either use tiny umbrella to help you verify your 4.0 shsh blob or point your hosts file towards cydia and you can just put your iphone into recovery mode and restore to stock 4.0.
Jailbreak it with Jailbreakme.com from Safari on your iphone.
Unlock with Ultrasn0w again.