SELECT 
  cscart_product_prices.product_id, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  cscart_product_prices 
WHERE 
  cscart_product_prices.product_id IN (
    366926, 366913, 366931, 366914, 366929, 
    366928, 366927, 366936, 366937, 368738, 
    366940, 366915, 368731, 368839, 366930, 
    368772, 366933, 366934, 368698, 368735, 
    366939, 366932, 368733, 366942, 368677, 
    366949, 368770, 368734, 368730, 368716, 
    368829, 368783, 368798, 368740, 366948, 
    368822, 368750, 366947, 366943, 368795, 
    368818, 366938, 368714, 368742, 368715, 
    368797, 366941, 368827, 366950, 368718, 
    368823, 350398, 350316, 355400, 355448, 
    350217, 350261, 350356, 350219, 350578, 
    350251, 355391, 350477, 356841, 350526, 
    350585, 350202, 350542, 350537, 350208, 
    350484, 350212, 353704, 350323, 350539, 
    350211, 350553, 353714, 350510, 350416, 
    350204, 350459, 350213, 350207, 350222, 
    350455, 350225, 350198, 350392, 355393, 
    350505, 350580, 350518, 350528, 355591, 
    353706, 350584, 350320, 350406, 350214
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.00176

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (366926,366913,366931,366914,366929,366928,366927,366936,366937,368738,366940,366915,368731,368839,366930,368772,366933,366934,368698,368735,366939,366932,368733,366942,368677,366949,368770,368734,368730,368716,368829,368783,368798,368740,366948,368822,368750,366947,366943,368795,368818,366938,368714,368742,368715,368797,366941,368827,366950,368718,368823,350398,350316,355400,355448,350217,350261,350356,350219,350578,350251,355391,350477,356841,350526,350585,350202,350542,350537,350208,350484,350212,353704,350323,350539,350211,350553,353714,350510,350416,350204,350459,350213,350207,350222,350455,350225,350198,350392,355393,350505,350580,350518,350528,355591,353706,350584,350320,350406,350214)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
350198 339.75000000
350202 67.75000000
350204 4.90000000
350207 55.85000000
350208 40.55000000
350211 1.33000000
350212 5.07000000
350213 3.03000000
350214 7.11000000
350217 9.66000000
350219 6.26000000
350222 10.51000000
350225 17.48000000
350251 6.60000000
350261 3.54000000
350316 2.18000000
350320 2.35000000
350323 2.35000000
350356 3.37000000
350392 9.95000000
350398 7.62000000
350406 6.26000000
350416 21.85000000
350455 19.52000000
350459 6.60000000
350477 9.95000000
350484 21.85000000
350505 6.60000000
350510 62.65000000
350518 30.35000000
350526 6.26000000
350528 7.62000000
350537 50.75000000
350539 23.04000000
350542 11.02000000
350553 8.30000000
350578 6.26000000
350580 6.26000000
350584 6.26000000
350585 6.26000000
353704 59.25000000
353706 47.35000000
353714 33.75000000
355391 106.85000000
355393 106.85000000
355400 123.85000000
355448 24.57000000
355591 20.83000000
356841 33.24000000
366913 0.00000000
366914 0.00000000
366915 0.00000000
366926 0.00000000
366927 0.00000000
366928 0.00000000
366929 0.00000000
366930 0.00000000
366931 0.00000000
366932 0.00000000
366933 0.00000000
366934 0.00000000
366936 0.00000000
366937 0.00000000
366938 0.00000000
366939 0.00000000
366940 0.00000000
366941 0.00000000
366942 0.00000000
366943 0.00000000
366947 0.00000000
366948 0.00000000
366949 0.00000000
366950 0.00000000
368677 0.00000000
368698 0.00000000
368714 0.00000000
368715 0.00000000
368716 0.00000000
368718 0.00000000
368730 0.00000000
368731 0.00000000
368733 0.00000000
368734 0.00000000
368735 0.00000000
368738 0.00000000
368740 0.00000000
368742 0.00000000
368750 0.00000000
368770 0.00000000
368772 0.00000000
368783 0.00000000
368795 0.00000000
368797 0.00000000
368798 0.00000000
368818 0.00000000
368822 0.00000000
368823 0.00000000
368827 0.00000000
368829 0.00000000
368839 0.00000000