I had a the same problem, i bought a second hand BF3 with the online pass already used...
This is one of the ways to get it free, you simply got EA customer support and you say that the online pass does not work and you say that you bought it brand new from the shops.
In the end they swap it with a new one.
Hope this helps in any way