UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lbjami6+YiarZuS6Xzrweq6N5LpfSiandINPMW5p2kQ='
WHERE
key_id = 'f7778ed490053114828b6ff32ae72fd613c1aebf9fa4a51d52a30b7bdb9db957'
AND (
token = 'lbjami6+YiarZuS6Xzrweq6N5LpfSiandINPMW5p2kQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)