SELECT 
  product_id, 
  group_id 
FROM 
  netting_product_variation_group_products 
WHERE 
  group_id IN (23, 27, 30, 31, 42, 45, 46)

Query time 0.00047

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "netting_product_variation_group_products",
          "access_type": "index",
          "possible_keys": ["idx_group_id"],
          "key": "PRIMARY",
          "key_length": "6",
          "used_key_parts": ["product_id", "group_id"],
          "rows": 167,
          "filtered": 46.10778427,
          "attached_condition": "netting_product_variation_group_products.group_id in (23,27,30,31,42,45,46)",
          "using_index": true
        }
      }
    ]
  }
}

Result

product_id group_id
531 23
533 23
534 23
535 23
536 23
537 23
538 23
539 23
540 23
541 23
542 23
543 23
544 23
545 23
546 23
547 23
569 31
570 27
571 27
572 27
592 30
593 30
594 30
595 30
596 30
597 30
598 30
599 30
600 30
601 30
602 30
603 30
604 30
605 30
606 30
607 30
611 31
612 31
706 42
707 42
708 42
709 42
710 42
711 42
712 42
713 42
714 42
715 42
716 42
717 42
718 42
719 42
720 42
721 42
757 45
758 45
759 45
761 46
762 46
763 46
764 46
765 46
766 46
767 46
768 46
769 46
770 46
771 46
772 46
773 46
774 46
775 46
776 46