UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wvOdO/ooRNkYPcCUXAJY1YT9eRWKpwcggIFolP4+2Ds='
WHERE
key_id = 'dc6656e5ddc11f9562c441ec6625d521d98def2c1e1ffc3be51cb02823d44e87'
AND (
token = 'wvOdO/ooRNkYPcCUXAJY1YT9eRWKpwcggIFolP4+2Ds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)