UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u4xCZdf7X7hF4ULZeqyYXbLZd3P/tdG88SOP+7sYq8c='
WHERE
key_id = '75fbd081c6b0ca6921123d8648222f8d1520c83655a6634f6d8ef6deecb8a5f0'
AND (
token = 'u4xCZdf7X7hF4ULZeqyYXbLZd3P/tdG88SOP+7sYq8c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)