UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '73Nz9b+UYsDIV8ryKbGFXTTd7ZVdiSrvUSArTvZ5wR4='
WHERE
key_id = '27eaf852790621635214d855d3cb601ce2e33c85edfe725e8448a51c7ad77683'
AND (
token = '73Nz9b+UYsDIV8ryKbGFXTTd7ZVdiSrvUSArTvZ5wR4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)