UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YUoEsQ6010LbJCw3rLgX16FFmQ/uLXDlFCNoiggyeLM='
WHERE
key_id = 'dbfb81088dbdbc0a8187e76fa338c2c13bb2f63fa0fe81e7836cbdae7caf4aa2'
AND (
token = 'YUoEsQ6010LbJCw3rLgX16FFmQ/uLXDlFCNoiggyeLM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)