UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tdjSezyXnvZSeTCx7cTjG3FJAR/I2B1G0cCVlAvF7Iw='
WHERE
key_id = 'fead2131a2b3060fcbe1cdb1e2a57f0710bd7b393032c0b42ed14748c9c1c55e'
AND (
token = 'tdjSezyXnvZSeTCx7cTjG3FJAR/I2B1G0cCVlAvF7Iw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)