You can plug it to iTunes and hit restore.
It will update it to 3.1.3
Or just download the appropriate .ipsw and shift restore.
And no. Jailbreakme.com is not compatible with your device and iOS version and also does not unlock your phone. Unlocking and jail breaking are 2 different things.
Some knowledge about jailbreakme exploits.
My fav jailbreaks released btw
JailbreakMe 1.0Edit
JailbreakMe, started in 2007, was originally used to jailbreak the
iPhone and
iPod Touch running the 1.1.1 version of
iOS, then named iPhone OS. Using a TIFF exploit against
Safari, this installed
Installer.app.
[3]The vulnerability used in this exploit was patched by Apple in the 1.1.2 firmware.
This tool, also called "AppSnapp", was created by a group of nine developers.
[4]
JailbreakMe 2.0 StarEdit
JailbreakMe 2.0, released by comex on August 1, 2010, exploits a
vulnerability in the
FreeType library used while rendering PDF files. This was the first publicly available jailbreak for the iPhone 4, able to jailbreak iOS 3.1.2 through 4.0.1 on the iPhone, iPod Touch, and iPad models then current.
[5] This jailbreak was activated by visiting the jailbreakme.com web page on the device's Safari web browser.
The vulnerability used by JailbreakMe 2.0 was patched by Apple in
iOS 4.0.2.
[6]
JailbreakMe 3.0 SaffronEdit
JailbreakMe 3.0, released on July 6, 2011, can jailbreak most iOS devices on iOS 4.3-4.3.3 and iPad 2 on 4.3.3.
[7] It is the first publicly available jailbreak for iPad 2. JailbreakMe 3.0 exploits a FreeType parser security flaw (similar to JailbreakMe 2.0), using the form of a PDF file rendered by Mobile Safari, which then uses a kernel vulnerability to complete the untethered jailbreak.
[8][9] Comex also released a patch for this FreeType flaw, called "PDF Patcher 2", which is available as a free package installable via Cydia.
[10]
A few days before initial release, a beta tester leaked JailbreakMe 3.0 to the public. Comex said on Twitter, that this put him on a "time limit" to release the final version quickly.
[10]
The JailbreakMe website looks similar to downloading an
App Store app. It includes a blue button saying "FREE", which turns into a green button with the word "INSTALL" when pressed once, much like any application on the App Store. After tapping "INSTALL", Safari closes, Cydia loads as a new app, and the device is now fully jailbroken with no reboot necessary.
On July 15, 2011, Apple released iOS 4.3.4 (GSM) and 4.2.9 (CDMA) to patch the flaws used by JailbreakMe.
[11]
Comex received a
Pwnie Award at the
Black Hat Conference in 2011 for "Best Client-Side Bug" for this work.
[12]
Comex was hired by Apple as an intern in August 2011.
[13]