If I'm not mistaken, the codes are tied to your EA account.
Although I just realized I dodged a major bullet, because I actually bought Crysis 2 used and didn't think twice when I tried to play the mp. But I would've probably been saddened if it wanted an online pass code. Which is quite odd that EA, the forefathers of the online pass, didn't include one in Crysis 2 (a definite big hit seller). Maybe they look at reserve numbers and if they're low they do the online pass knowing people are going to get it used or rented....