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 (
    309474, 309478, 206988, 391625, 309476, 
    391630, 309469, 391627, 391629, 262380, 
    309470, 252156, 206990, 206986, 309475, 
    309431, 391628, 206991, 309472, 252154, 
    391631, 339432, 265269, 206468, 339433, 
    262428, 308644, 206965, 13481, 13466, 
    339434, 339438, 262429, 206983, 308657, 
    206950, 262440, 262370, 262437, 206929, 
    308646, 339439, 230172, 259698, 13488, 
    206977, 339445, 13474, 262430, 252155, 
    262436, 262434, 262432, 13486, 339440, 
    206993, 262441, 173883, 13468, 262400, 
    230173, 339511, 339515, 206933, 339441, 
    13469, 254299, 13485, 252159, 13484, 
    254297, 252157, 427782, 253161, 262359, 
    225088, 262438, 253198, 262435, 253157, 
    262439, 81573, 81586, 225081, 225074, 
    35390, 254305, 159862, 38238, 13487, 
    225053, 262399, 262394, 252161, 225066, 
    262442, 252162, 287, 81610, 286682
  )

Query time 0.00163

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 (309474,309478,206988,391625,309476,391630,309469,391627,391629,262380,309470,252156,206990,206986,309475,309431,391628,206991,309472,252154,391631,339432,265269,206468,339433,262428,308644,206965,13481,13466,339434,339438,262429,206983,308657,206950,262440,262370,262437,206929,308646,339439,230172,259698,13488,206977,339445,13474,262430,252155,262436,262434,262432,13486,339440,206993,262441,173883,13468,262400,230173,339511,339515,206933,339441,13469,254299,13485,252159,13484,254297,252157,427782,253161,262359,225088,262438,253198,262435,253157,262439,81573,81586,225081,225074,35390,254305,159862,38238,13487,225053,262399,262394,252161,225066,262442,252162,287,81610,286682))"
        }
      },
      {
        "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
697 group_variation_catalog_item 225053 0 6233 PV-E2DAB8356
697 group_variation_catalog_item 225066 0 6234 PV-A01854629
697 group_variation_catalog_item 225074 0 6235 PV-274DB4C86
697 group_variation_catalog_item 225081 0 6236 PV-88CBABE3D
697 group_variation_catalog_item 225088 0 6237 PV-A6EF23734
897 group_variation_catalog_item 230172 0 6387 PV-20514A33B
897 group_variation_catalog_item 230173 0 6384 PV-C46F7C23F
897 group_variation_catalog_item 259698 0 6472 PV-5CE224FC8
932 group_variation_catalog_item 262359 0 6687 PV-A64AE720F
932 group_variation_catalog_item 262370 0 6689 PV-F20768D91
897 group_variation_catalog_item 262380 0 6692 PV-FEE44F36A
932 group_variation_catalog_item 262394 0 6694 PV-26864BE63