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 (
    13407, 13439, 13440, 13441, 13442, 13443, 
    13499, 13444, 13445, 13408, 13446, 
    13447, 13448, 13409, 13504, 13410, 
    13449, 13450, 13411, 13412, 13413, 
    13414, 13415, 13451
  ) 
  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.00074

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.06190128,
    "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": 49.95571136,
          "attached_condition": "cscart_product_prices.lower_limit = 1 and cscart_product_prices.product_id in (13407,13439,13440,13441,13442,13443,13499,13444,13445,13408,13446,13447,13448,13409,13504,13410,13449,13450,13411,13412,13413,13414,13415,13451) and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    ]
  }
}

Result

product_id price
13407 12.00000000
13408 20.00000000
13409 19.00000000
13410 13.00000000
13411 15.00000000
13412 12.00000000
13413 21.00000000
13414 15.00000000
13415 12.00000000
13439 6.50000000
13440 4.50000000
13441 4.10000000
13442 4.10000000
13443 4.10000000
13444 4.50000000
13445 4.90000000
13446 7.70000000
13447 5.30000000
13448 4.10000000
13449 7.30000000
13450 4.10000000
13451 4.10000000
13499 20.00000000
13504 8.00000000