UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GQQxgvwq7O56UNE+E3GRe262tPNlSKP1495NMsMP2cA='
WHERE
key_id = '880791ec6bef9be7d3b72428172ee8368d7435bab5ebaec2afd6d3bce1e35e5c'
AND (
token = 'GQQxgvwq7O56UNE+E3GRe262tPNlSKP1495NMsMP2cA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)