UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nA+fdsi5By+IBwzCjhydcNVpBVjnobO8IfAy/hGCTWk='
WHERE
key_id = '70c3c448a199ee9894314b74f47dbd5ae0af8db63be563ae45052979384480a4'
AND (
token = 'nA+fdsi5By+IBwzCjhydcNVpBVjnobO8IfAy/hGCTWk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)