UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uXyUxsQTAsN/OmLeuKHVOaJ78cWC3ARQ7P/M3bO2WlQ='
WHERE
key_id = '411db5a2d63d2d71e8d528053c0b147debf5992fd34b6bc7e82839168517925a'
AND (
token = 'uXyUxsQTAsN/OmLeuKHVOaJ78cWC3ARQ7P/M3bO2WlQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)