Operating a 12V electric lock with arduino
The mosfet looks fine.

The things you need to worry about when selecing a mosfet for an application like this are:

1) Will the gate voltage turn on 
The Vgs is 2.5V for the FQP30N06L so a 3.3V signal from an arudio will be more than enough.

2) Will it overheat? 
In your case no, the Rdson will be about 0.04Ω which at 2A would be roughly 0.08W which would contribue less than 1C of temperature rise

3) Will the Vdss of the part ever be exceeded. The 60V of Vdss would be plenty for a 12V application, except for one detail. The coil in the lock has inductance, when you turn inductors off the voltage get's very high. Make sure you protect the mosfet with a diode:


Source: http://www.coilgun.eclipse.co.uk/switching_devices.html