UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EyejUXN/601Oy6MRSm1XG/gOh0B6JegmLiiC4fCIYMM='
WHERE
key_id = '43d4be5494e95b11aa070c36b47f379a54df95b277f5cff6e9bd5ec7f090f15c'
AND (
token = 'EyejUXN/601Oy6MRSm1XG/gOh0B6JegmLiiC4fCIYMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)