UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CptPxVvYFQf/wVeZ3C4Ssc8OzjzZot2lCUDtoyNezjE='
WHERE
key_id = '5f108c82ffb6e1e20c6812de44968bd025a865b4409c93b3a9a4e93fa33c5387'
AND (
token = 'CptPxVvYFQf/wVeZ3C4Ssc8OzjzZot2lCUDtoyNezjE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)