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 (
    5400, 5401, 5402, 5403, 5404, 5405, 5406, 
    5407, 5408, 5409, 5410, 5411, 5412, 
    5413, 5414, 6728, 515, 3156, 3676, 5131, 
    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
  )

Query time 0.00072

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "134.41"
    },
    "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": 64,
          "rows_produced_per_join": 64,
          "filtered": "100.00",
          "index_condition": "(`gaseus`.`p`.`product_id` in (5400,5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,5413,5414,6728,515,3156,3676,5131,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))",
          "cost_info": {
            "read_cost": "38.41",
            "eval_cost": "6.40",
            "prefix_cost": "44.81",
            "data_read_per_join": "1024"
          },
          "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": 64,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "16.00",
            "eval_cost": "6.40",
            "prefix_cost": "67.21",
            "data_read_per_join": "25K"
          },
          "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": 192,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "48.00",
            "eval_cost": "19.20",
            "prefix_cost": "134.41",
            "data_read_per_join": "19K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}