UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gOvJ8fpJaDDHJDZ5XI2IKwOkVaWM5aOurGM9ZyMNP9E='
WHERE
key_id = '0d0ca31698d782e6919291c26f7453df4113ff0a208971240aec8b5f50d90e2e'
AND (
token = 'gOvJ8fpJaDDHJDZ5XI2IKwOkVaWM5aOurGM9ZyMNP9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)