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 (
    51567, 51565, 51564, 139, 129, 51566, 
    51301, 51, 50, 51497, 51498, 53, 22713, 
    21, 22714, 22712
  )

Query time 0.00062

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.71"
    },
    "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": 18,
          "rows_produced_per_join": 18,
          "filtered": "100.00",
          "index_condition": "(`test_uchur_k`.`p`.`product_id` in (51567,51565,51564,139,129,51566,51301,51,50,51497,51498,53,22713,21,22714,22712))",
          "cost_info": {
            "read_cost": "10.31",
            "eval_cost": "1.80",
            "prefix_cost": "12.11",
            "data_read_per_join": "288"
          },
          "used_columns": [
            "product_id",
            "parent_product_id",
            "group_id"
          ]
        }
      },
      {
        "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": [
            "test_uchur_k.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 18,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "4.50",
            "eval_cost": "1.80",
            "prefix_cost": "18.41",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "3",
          "ref": [
            "test_uchur_k.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 18,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "4.50",
            "eval_cost": "1.80",
            "prefix_cost": "24.71",
            "data_read_per_join": "7K"
          },
          "used_columns": [
            "id",
            "code"
          ]
        }
      }
    ]
  }
}

Result

feature_id purpose product_id parent_product_id id code
193 group_variation_catalog_item 21 0 139 PV-2225895EA
193 group_variation_catalog_item 50 0 195 PV-21031C262
193 group_variation_catalog_item 51 0 194 PV-69BE76E35
193 group_variation_catalog_item 53 0 140 PV-8DFBFB3CA
193 group_variation_catalog_item 129 0 192 PV-28B293034
193 group_variation_catalog_item 139 0 190 PV-9DEE83BA2
193 group_variation_catalog_item 22712 0 128 PV-BB91390C8
193 group_variation_catalog_item 22713 0 125 PV-3D773B9A4
193 group_variation_catalog_item 22714 0 126 PV-2EAE77DB9
193 group_variation_catalog_item 51301 0 191 PV-BBC751A7A
193 group_variation_catalog_item 51497 0 255 PV-5B6D025F3
193 group_variation_catalog_item 51498 0 256 PV-C00E04AE4
193 group_variation_catalog_item 51564 0 257 PV-8C5861DB2
193 group_variation_catalog_item 51565 0 258 PV-73C5400AA
193 group_variation_catalog_item 51566 0 259 PV-4A4E03954
193 group_variation_catalog_item 51567 0 260 PV-29F3990C4