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 (
    5438, 5818, 40309, 5770, 1751, 37294, 
    6604, 41358, 40754, 2086, 31734, 3854, 
    36476, 1436, 5167, 1266, 798, 37302, 
    61, 37284, 45573, 28115, 41368, 4865, 
    3464, 1542, 41124, 41387, 62, 27939, 
    4938, 1669
  )

Query time 0.00281

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 (5438,5818,40309,5770,1751,37294,6604,41358,40754,2086,31734,3854,36476,1436,5167,1266,798,37302,61,37284,45573,28115,41368,4865,3464,1542,41124,41387,62,27939,4938,1669)"
        }
      },
      {
        "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
22081 group_variation_catalog_item 798 0 14364 PV-66AA010FD
21757 group_variation_catalog_item 1266 0 14078 PV-077FA0821
21646 group_variation_catalog_item 1436 0 13974 PV-82A5981C9
21592 group_variation_catalog_item 1542 0 13924 PV-BC1461C1D
20170 group_variation_catalog_item 4865 0 12645 PV-F95EB7601
20148 group_variation_catalog_item 4938 0 12623 PV-BCE0ECBA0
19615 group_variation_catalog_item 6604 0 12146 PV-32DA7517D
24137 group_variation_catalog_item 40754 0 16347 PV-08DF8D2E3
24138 group_variation_catalog_item 40754 0 16347 PV-08DF8D2E3
24191 group_variation_catalog_item 41124 0 16433 PV-F2317C3A4
24634 group_variation_catalog_item 45573 0 16872 PV-AC8E1F32B