UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XxNATi+3ybASjEIA+LGeuzHsrY9m6l+dfhvqmR0+6RE='
WHERE
key_id = '194d8d3ec5345c7ea4f296fe907e27d0009c2284beb82a0594e7bccc5d5a3a0f'
AND (
token = 'XxNATi+3ybASjEIA+LGeuzHsrY9m6l+dfhvqmR0+6RE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)