UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bOQ1J88lJ7BrMXj7easVYbX1fxZVuJn4qVV0wmJtf7w='
WHERE
key_id = '49ace3b440c1aaea5afedd79efda85eb98a46a4e035c11521f88a53f67235a8b'
AND (
token = 'bOQ1J88lJ7BrMXj7easVYbX1fxZVuJn4qVV0wmJtf7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)