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 (
    400971, 439522, 420223, 402063, 434025, 
    453641, 407875, 450825, 427907, 427353, 
    431455, 406944, 424119, 412948, 438098, 
    417337, 403309, 429951, 411429, 443819, 
    402148, 438958, 423821, 449843
  ) 
  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.00143

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.099614043,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "range",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "usergroup",
          "key_length": "9",
          "used_key_parts": ["product_id", "usergroup_id", "lower_limit"],
          "loops": 1,
          "rows": 48,
          "cost": 0.08425304,
          "filtered": 50,
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.product_id in (400971,439522,420223,402063,434025,453641,407875,450825,427907,427353,431455,406944,424119,412948,438098,417337,403309,429951,411429,443819,402148,438958,423821,449843) and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
400971 39.40000000
402063 1335.09000000
402148 696.28000000
403309 557.58000000
406944 289.16000000
407875 1400.49000000
411429 1799.84000000
412948 368.70000000
417337 346.73000000
420223 80.89000000
423821 1407.15000000
424119 761.26000000
427353 1104.33000000
427907 637.73000000
429951 968.73000000
431455 611.31000000
434025 490.51000000
438098 378.13000000
438958 1982.22000000
439522 326.31000000
443819 1918.22000000
449843 1004.10000000
450825 976.49000000
453641 1526.70000000