It can't be jailbroken at the moment, but we are expecting a new tool any day.
If you had SHSH files saved for 3.1.x then you could downgrade and jailbreak there. Further, if you have the old bootrom 3GS, once JB at 3.1.x you could use custom firmware to get back to 4.0 or 4.0.1