UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7IxSAUj4rn6JuLG+H9/swkoYEI5sNzRQSqNCh78Zw54='
WHERE
key_id = 'eef3afe3066c5e110ab474533a4271b80c77358a9fb16ab5ce343a0cf918ac1e'
AND (
token = '7IxSAUj4rn6JuLG+H9/swkoYEI5sNzRQSqNCh78Zw54='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)