UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '69q43xbEM2mc0Sh8tcW9krBi7uxil0Hp67J7wCOhYLc='
WHERE
key_id = 'ee770608bff1f4c0b9dff62a40b0b98db7312ffa15d2efbb4b84b42fb73132c8'
AND (
token = '69q43xbEM2mc0Sh8tcW9krBi7uxil0Hp67J7wCOhYLc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)