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 (
    40369, 36504, 46263, 47608, 41118, 38795, 
    46616, 41120, 46187, 38766, 45260, 
    48817, 37893, 40370, 46239, 40361, 
    46265, 41109, 36509, 46137, 48565, 
    46136, 46189, 47611, 48814, 46267, 
    46241, 48813, 46266, 48815, 48325, 
    47614
  )

Query time 0.00797

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": 32,
          "filtered": 100,
          "index_condition": "p.product_id in (40369,36504,46263,47608,41118,38795,46616,41120,46187,38766,45260,48817,37893,40370,46239,40361,46265,41109,36509,46137,48565,46136,46189,47611,48814,46267,46241,48813,46266,48815,48325,47614)"
        }
      },
      {
        "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
23705 group_variation_catalog_item 36504 0 15825 PV-EBBA45E6B
23706 group_variation_catalog_item 36509 0 15830 PV-95DFB04B4
24191 group_variation_catalog_item 37893 0 16426 PV-9F5DC21DD
23987 group_variation_catalog_item 38766 0 16155 PV-3EB0829AC
23995 group_variation_catalog_item 38795 0 16161 PV-FC90FC6FA
24191 group_variation_catalog_item 41109 0 16425 PV-2A5767538
24191 group_variation_catalog_item 41118 0 16430 PV-69F3D44B7
24191 group_variation_catalog_item 41120 0 16431 PV-31276504C
24592 group_variation_catalog_item 45260 0 16819 PV-2A95EAF84
24834 group_variation_catalog_item 47608 0 17084 PV-FA5B94E92