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 (
    431225, 431483, 431058, 431207, 431430, 
    431475, 431496, 431086, 431479, 430986, 
    431036, 431282, 431351, 431391, 431450, 
    431223, 431059, 431227, 431437, 430716, 
    431294, 431492, 430996, 431278, 431296, 
    431396, 431435, 431460, 435511, 431413, 
    430777, 431367, 431221, 431261, 431323, 
    431331, 431485, 431276, 431258, 431307, 
    431312, 431348, 431471, 431382, 431448, 
    431095, 431477, 431499, 381714, 431214, 
    431310, 431375, 431449, 431266, 431299, 
    430728, 431491, 431347, 431366, 431436, 
    431441, 431075, 431418, 431489, 430709, 
    431228, 431265, 431321, 431400, 431363, 
    431486, 431189, 430670, 431206, 431370, 
    431374, 431388, 387053, 430774, 430779, 
    431209, 431232, 431256, 431257, 431379, 
    387048, 430710, 431179, 431404, 431445, 
    430668, 431293, 431277, 431286, 431462, 
    431317, 431473, 431476, 431320, 431390
  ) 
  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 (431225,431483,431058,431207,431430,431475,431496,431086,431479,430986,431036,431282,431351,431391,431450,431223,431059,431227,431437,430716,431294,431492,430996,431278,431296,431396,431435,431460,435511,431413,430777,431367,431221,431261,431323,431331,431485,431276,431258,431307,431312,431348,431471,431382,431448,431095,431477,431499,381714,431214,431310,431375,431449,431266,431299,430728,431491,431347,431366,431436,431441,431075,431418,431489,430709,431228,431265,431321,431400,431363,431486,431189,430670,431206,431370,431374,431388,387053,430774,430779,431209,431232,431256,431257,431379,387048,430710,431179,431404,431445,430668,431293,431277,431286,431462,431317,431473,431476,431320,431390)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
381714 70.00000000
387048 0.00000000
387053 0.00000000
430668 31.50000000
430670 31.50000000
430709 29.90000000
430710 29.90000000
430716 29.90000000
430728 31.50000000
430774 34.50000000
430777 34.50000000
430779 34.50000000
430986 31.50000000
430996 31.50000000
431036 31.50000000
431058 29.90000000
431059 29.90000000
431075 28.50000000
431086 28.50000000
431095 31.50000000
431179 26.90000000
431189 26.90000000
431206 29.90000000
431207 29.90000000
431209 29.90000000
431214 29.90000000
431221 29.90000000
431223 31.50000000
431225 31.50000000
431227 31.50000000
431228 31.50000000
431232 31.50000000
431256 36.50000000
431257 36.50000000
431258 36.50000000
431261 54.50000000
431265 54.50000000
431266 54.50000000
431276 36.50000000
431277 63.50000000
431278 63.50000000
431282 36.50000000
431286 36.50000000
431293 45.50000000
431294 45.50000000
431296 45.50000000
431299 45.50000000
431307 45.50000000
431310 45.50000000
431312 45.50000000
431317 49.90000000
431320 49.90000000
431321 49.90000000
431323 49.90000000
431331 67.90000000
431347 40.90000000
431348 40.90000000
431351 40.90000000
431363 49.90000000
431366 49.90000000
431367 49.90000000
431370 49.90000000
431374 45.50000000
431375 45.50000000
431379 45.50000000
431382 45.50000000
431388 49.90000000
431390 49.90000000
431391 49.90000000
431396 49.90000000
431400 49.90000000
431404 49.90000000
431413 49.90000000
431418 58.90000000
431430 58.90000000
431435 34.50000000
431436 34.50000000
431437 34.50000000
431441 34.50000000
431445 34.50000000
431448 29.90000000
431449 29.90000000
431450 29.90000000
431460 29.90000000
431462 31.50000000
431471 31.50000000
431473 31.50000000
431475 31.50000000
431476 34.50000000
431477 34.50000000
431479 34.50000000
431483 34.50000000
431485 34.50000000
431486 34.50000000
431489 34.50000000
431491 34.50000000
431492 34.50000000
431496 34.50000000
431499 34.50000000
435511 0.00000000