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 (
    431312, 431450, 431036, 431276, 431396, 
    431014, 431298, 431414, 431172, 431233, 
    431296, 431442, 381706, 431207, 431471, 
    431180, 431332, 431479, 431455, 431213, 
    430970, 431496, 430996, 431059, 431278, 
    431413, 431095, 431189, 431299, 431075, 
    431478, 431282, 431483, 431351, 431435, 
    431436, 431489, 430728, 431232, 431391, 
    431448, 431214, 431265, 387048, 431449, 
    430986, 431331, 431323, 431375, 431379, 
    431477, 431492, 431388, 431437, 431475, 
    431485, 381714, 431261, 431374, 431476, 
    431499, 431221, 431258, 431266, 435511, 
    387053, 431462, 430709, 431347, 431441, 
    431366, 431320, 431363, 430774, 431307, 
    431257, 430779, 431179, 431348, 431404, 
    431228, 430668, 430710, 431317, 431277, 
    431473, 431321, 431418, 431445, 431206, 
    431293, 431209, 431389, 431486, 431491, 
    430670, 431400, 431390, 431256, 431443
  ) 
  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.00131

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 (431312,431450,431036,431276,431396,431014,431298,431414,431172,431233,431296,431442,381706,431207,431471,431180,431332,431479,431455,431213,430970,431496,430996,431059,431278,431413,431095,431189,431299,431075,431478,431282,431483,431351,431435,431436,431489,430728,431232,431391,431448,431214,431265,387048,431449,430986,431331,431323,431375,431379,431477,431492,431388,431437,431475,431485,381714,431261,431374,431476,431499,431221,431258,431266,435511,387053,431462,430709,431347,431441,431366,431320,431363,430774,431307,431257,430779,431179,431348,431404,431228,430668,430710,431317,431277,431473,431321,431418,431445,431206,431293,431209,431389,431486,431491,430670,431400,431390,431256,431443)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
381706 40.00000000
381714 70.00000000
387048 0.00000000
387053 0.00000000
430668 31.50000000
430670 31.50000000
430709 29.90000000
430710 29.90000000
430728 31.50000000
430774 34.50000000
430779 34.50000000
430970 31.50000000
430986 31.50000000
430996 31.50000000
431014 31.50000000
431036 31.50000000
431059 29.90000000
431075 28.50000000
431095 31.50000000
431172 26.90000000
431179 26.90000000
431180 26.90000000
431189 26.90000000
431206 29.90000000
431207 29.90000000
431209 29.90000000
431213 29.90000000
431214 29.90000000
431221 29.90000000
431228 31.50000000
431232 31.50000000
431233 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
431293 45.50000000
431296 45.50000000
431298 45.50000000
431299 45.50000000
431307 45.50000000
431312 45.50000000
431317 49.90000000
431320 49.90000000
431321 49.90000000
431323 49.90000000
431331 67.90000000
431332 67.90000000
431347 40.90000000
431348 40.90000000
431351 40.90000000
431363 49.90000000
431366 49.90000000
431374 45.50000000
431375 45.50000000
431379 45.50000000
431388 49.90000000
431389 49.90000000
431390 49.90000000
431391 49.90000000
431396 49.90000000
431400 49.90000000
431404 49.90000000
431413 49.90000000
431414 49.90000000
431418 58.90000000
431435 34.50000000
431436 34.50000000
431437 34.50000000
431441 34.50000000
431442 34.50000000
431443 34.50000000
431445 34.50000000
431448 29.90000000
431449 29.90000000
431450 29.90000000
431455 29.90000000
431462 31.50000000
431471 31.50000000
431473 31.50000000
431475 31.50000000
431476 34.50000000
431477 34.50000000
431478 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