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 (
    3775, 3776, 3777, 1143, 1139, 1140, 1141, 
    1142, 3681, 3682, 3683, 3684, 3685, 
    4890, 2207, 2208, 2209, 2210, 2211, 
    2212, 2213, 2214, 2215, 2216, 5808, 
    5809, 5810, 5811, 5812, 5813, 5814, 
    5815, 5816, 1654, 1655, 1656, 1657, 
    1658, 1659, 1660, 1661, 1662, 1663, 
    1664, 1665, 1666, 1667, 1668, 1669, 
    1670, 1671, 2220, 2221, 2222, 2223, 
    5353, 5354, 5355, 5356, 5357, 5358, 
    5359, 5360, 5361, 5362, 5363, 5364, 
    5365, 5366, 5367, 5368, 5369, 5370, 
    5820, 5821, 5822, 5823, 5802
  )

Query time 0.00074

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "163.81"
    },
    "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": 78,
          "rows_produced_per_join": 78,
          "filtered": "100.00",
          "index_condition": "(`gaseus`.`p`.`product_id` in (3775,3776,3777,1143,1139,1140,1141,1142,3681,3682,3683,3684,3685,4890,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,5808,5809,5810,5811,5812,5813,5814,5815,5816,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,2220,2221,2222,2223,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,5370,5820,5821,5822,5823,5802))",
          "cost_info": {
            "read_cost": "46.81",
            "eval_cost": "7.80",
            "prefix_cost": "54.61",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "product_id",
            "parent_product_id",
            "group_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "3",
          "ref": [
            "gaseus.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 78,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "19.50",
            "eval_cost": "7.80",
            "prefix_cost": "81.91",
            "data_read_per_join": "30K"
          },
          "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": [
            "gaseus.p.group_id"
          ],
          "rows_examined_per_scan": 3,
          "rows_produced_per_join": 234,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "58.50",
            "eval_cost": "23.40",
            "prefix_cost": "163.81",
            "data_read_per_join": "23K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}