UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sj+2n0npwMgGpLl5IoU0nHA0XrrvkFbfrmD4o/CJgCo='
WHERE
key_id = '892260345022594954bb8758c12e7d9b5fcf93a500dc3629a204224d6c422552'
AND (
token = 'sj+2n0npwMgGpLl5IoU0nHA0XrrvkFbfrmD4o/CJgCo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)