UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CZnG5456XsxToI4875E8RSIpkKxDZKpAI9+VYvWCKmA='
WHERE
key_id = '3663e95ff2f4bc72d30baccaf028058af8209ac23fe9fb928c5c2accaa99a95e'
AND (
token = 'CZnG5456XsxToI4875E8RSIpkKxDZKpAI9+VYvWCKmA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)