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 (
    1335, 1338, 1233, 1324, 1323, 1081, 1326, 
    1325, 1333, 1082, 1321, 1330, 1331, 
    1329, 1334, 1337, 1339, 1340, 1343, 
    399, 1299, 1810, 1811, 2918
  ) 
  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.00044

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.052674528,
    "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.04656984,
          "filtered": 20,
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.product_id in (1335,1338,1233,1324,1323,1081,1326,1325,1333,1082,1321,1330,1331,1329,1334,1337,1339,1340,1343,399,1299,1810,1811,2918) and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
399 282.00000000
1081 248.16000000
1082 411.72000000
1233 37.60000000
1299 1710.80000000
1321 99.64000000
1323 940.00000000
1324 676.80000000
1325 1118.60000000
1326 695.60000000
1329 443.68000000
1330 10.00000000
1331 443.68000000
1333 184.24000000
1334 1146.80000000
1335 498.20000000
1337 686.20000000
1338 340.28000000
1339 152.28000000
1340 219.96000000
1343 415.48000000
1810 1118.60000000
1811 1118.60000000
2918 100.00000000