UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UzMu8dmiwFQa1xll2r+it5i7sEnplJwJyZA2cvccSMU='
WHERE
key_id = 'eb63bdc88d26299bc60781e83bb20114e4c6ab5d85b18efeada94e45e5f8f2a5'
AND (
token = 'UzMu8dmiwFQa1xll2r+it5i7sEnplJwJyZA2cvccSMU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)