This one-line jquery statement should do the trick:
$(".class:visible:not('.match_group')").css("background-color", "blue");
Try this:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".class:visible:not('.match_group')").css("background-color", "blue");
});
</script>
</head>
<body>
<p class="class">visible has class but no match_group</p>
<p class="class match_group">visible has class and match_group</p>
<p class="class" style="display: none">not visible has class but no match_group</p>
<p class="class match_group" style="display: none">not visible has class and match_group</p>
</body>
</html>