UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FPYkZmEUnYtCzNO1w4IReBOLrI/0HXo+TYK3mP2OYk4='
WHERE
key_id = '06dffbc005f1f448bb349310007f2bfd2b848465e954ac00f185c914f0f5c11e'
AND (
token = 'FPYkZmEUnYtCzNO1w4IReBOLrI/0HXo+TYK3mP2OYk4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)