SELECT 
  f.feature_id, 
  f.purpose, 
  p.product_id, 
  p.parent_product_id, 
  g.id, 
  g.code 
FROM 
  cscart_product_variation_group_features AS f 
  INNER JOIN cscart_product_variation_groups AS g ON f.group_id = g.id 
  INNER JOIN cscart_product_variation_group_products AS p ON f.group_id = p.group_id 
WHERE 
  p.product_id IN (
    339678, 431132, 265042, 339796, 339541, 
    339477, 339457, 339700, 431202, 431162, 
    339811, 339489, 339458, 431128, 431099, 
    339623, 431155, 392172, 339453, 339797, 
    339606, 339798, 339699, 430639, 431141, 
    339643, 339469, 392167, 431130, 431168, 
    339482, 339685, 431153, 339730, 431154, 
    339731, 431137, 431096, 339463, 381703, 
    392175, 339709, 431124, 339460, 430637, 
    431125, 381725, 339478, 339468, 431094, 
    339467, 430745, 431146, 339810, 430911, 
    339753, 431134, 430640, 431048, 339696, 
    431033, 431187, 339806, 339805, 339757, 
    339794, 339701, 339808, 431191, 430697, 
    430767, 431067, 431117, 339464, 339787, 
    381701, 431157, 431104, 381687, 431090, 
    392166, 431107, 431116, 431204, 339452, 
    431196, 431065, 339752, 339814, 430744, 
    431084, 339695, 339750, 431203, 431176, 
    339656, 431100, 431199, 430655, 431160
  )

Query time 0.00174

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "430.18"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY",
            "idx_group_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "rows_examined_per_scan": 100,
          "rows_produced_per_join": 100,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "120.12",
            "eval_cost": "20.00",
            "prefix_cost": "140.12",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "product_id",
            "parent_product_id",
            "group_id"
          ],
          "attached_condition": "(`webmarco`.`p`.`product_id` in (339678,431132,265042,339796,339541,339477,339457,339700,431202,431162,339811,339489,339458,431128,431099,339623,431155,392172,339453,339797,339606,339798,339699,430639,431141,339643,339469,392167,431130,431168,339482,339685,431153,339730,431154,339731,431137,431096,339463,381703,392175,339709,431124,339460,430637,431125,381725,339478,339468,431094,339467,430745,431146,339810,430911,339753,431134,430640,431048,339696,431033,431187,339806,339805,339757,339794,339701,339808,431191,430697,430767,431067,431117,339464,339787,381701,431157,431104,381687,431090,392166,431107,431116,431204,339452,431196,431065,339752,339814,430744,431084,339695,339750,431203,431176,339656,431100,431199,430655,431160))"
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "3",
          "ref": [
            "webmarco.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 100,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "100.00",
            "eval_cost": "20.00",
            "prefix_cost": "260.12",
            "data_read_per_join": "39K"
          },
          "used_columns": [
            "id",
            "code"
          ]
        }
      },
      {
        "table": {
          "table_name": "f",
          "access_type": "ref",
          "possible_keys": [
            "idx_group_id"
          ],
          "key": "idx_group_id",
          "used_key_parts": [
            "group_id"
          ],
          "key_length": "3",
          "ref": [
            "webmarco.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 141,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "141.72",
            "eval_cost": "28.34",
            "prefix_cost": "430.18",
            "data_read_per_join": "14K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}

Result

feature_id purpose product_id parent_product_id id code
1117 group_variation_catalog_item 392172 0 8573 PV-B7B447620
1117 group_variation_catalog_item 392175 0 8574 PV-0BB88E472