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 (
    1554, 1560, 3452, 4009, 1556, 2527, 1561, 
    1134, 5696, 2088, 2490, 4022, 9, 2698, 
    1406, 5290, 5721, 508, 1555, 3090, 2372, 
    1587, 4013, 5621
  )

Query time 0.00098

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "37.06"
    },
    "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": 27,
          "rows_produced_per_join": 27,
          "filtered": "100.00",
          "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`p`.`product_id` in (1554,1560,3452,4009,1556,2527,1561,1134,5696,2088,2490,4022,9,2698,1406,5290,5721,508,1555,3090,2372,1587,4013,5621))",
          "cost_info": {
            "read_cost": "15.46",
            "eval_cost": "2.70",
            "prefix_cost": "18.16",
            "data_read_per_join": "432"
          },
          "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": [
            "softwarepirmam_hewadelivard_cscart_4.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 27,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "6.75",
            "eval_cost": "2.70",
            "prefix_cost": "27.61",
            "data_read_per_join": "10K"
          },
          "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": [
            "softwarepirmam_hewadelivard_cscart_4.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 27,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "6.75",
            "eval_cost": "2.70",
            "prefix_cost": "37.06",
            "data_read_per_join": "2K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}

Result

feature_id purpose product_id parent_product_id id code
648 group_variation_catalog_item 508 0 55 PV-338381E65
656 group_variation_catalog_item 508 0 55 PV-338381E65
649 group_variation_catalog_item 1134 0 63 PV-A698F3E19
656 group_variation_catalog_item 1134 0 63 PV-A698F3E19
648 group_variation_catalog_item 1134 0 63 PV-A698F3E19
643 group_variation_catalog_item 1406 0 87 PV-74A04BB83
656 group_variation_catalog_item 1406 0 87 PV-74A04BB83
648 group_variation_catalog_item 1406 0 87 PV-74A04BB83
656 group_variation_catalog_item 2490 0 204 PV-2B3485D42
648 group_variation_catalog_item 2490 0 204 PV-2B3485D42
643 group_variation_catalog_item 2527 0 213 PV-A39282D9A
656 group_variation_catalog_item 2527 0 213 PV-A39282D9A
648 group_variation_catalog_item 2527 0 213 PV-A39282D9A
656 group_variation_catalog_item 2698 0 260 PV-87607C580
656 group_variation_catalog_item 3090 0 340 PV-1EDF3347F
656 group_variation_catalog_item 3452 0 394 PV-D0EB41EEB
658 group_variation_catalog_item 4022 0 452 PV-E943E4C5E
656 group_variation_catalog_item 5621 0 608 PV-F336D5ECD
656 group_variation_catalog_item 5696 0 623 PV-7A5534DF1
656 group_variation_catalog_item 5721 0 627 PV-E0B3A4CF3