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 (
    49251, 40435, 40445, 40437, 40451, 49487, 
    49539, 47084, 40442, 40446, 40443, 
    40449, 40448, 40447, 40444, 40436, 
    40450, 40438, 40441, 40439, 40434, 
    40440, 634, 48826, 294, 48772, 39612, 
    36304, 635, 636, 48827, 31953
  )

Query time 0.00135

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "idx_group_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rows": 33,
          "filtered": 100,
          "index_condition": "p.product_id in (49251,40435,40445,40437,40451,49487,49539,47084,40442,40446,40443,40449,40448,40447,40444,40436,40450,40438,40441,40439,40434,40440,634,48826,294,48772,39612,36304,635,636,48827,31953)"
        }
      },
      {
        "table": {
          "table_name": "f",
          "access_type": "ref",
          "possible_keys": ["idx_group_id"],
          "key": "idx_group_id",
          "key_length": "3",
          "used_key_parts": ["group_id"],
          "ref": ["dev_db.p.group_id"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["id"],
          "ref": ["dev_db.p.group_id"],
          "rows": 1,
          "filtered": 100
        }
      }
    ]
  }
}

Result

feature_id purpose product_id parent_product_id id code
22413 group_variation_catalog_item 294 0 14675 PV-2B85F9512
22176 group_variation_catalog_item 634 0 14458 PV-8CE6FE7DE
23278 group_variation_catalog_item 31953 0 15399 PV-2A166C89D
23736 group_variation_catalog_item 36304 0 15860 PV-D91A7FF46
24751 group_variation_catalog_item 47084 0 17001 PV-3A07D4BCA
24952 group_variation_catalog_item 48772 0 17207 PV-BFAC3C9D9
23731 group_variation_catalog_item 49251 0 15855 PV-AFDD5B7A6
25027 group_variation_catalog_item 49487 0 17273 PV-EF298C9F1