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 (
    388565, 389843, 415733, 388825, 389050, 
    389512, 390315, 388667, 388724, 390230, 
    389353, 389076, 389570, 389180, 415522, 
    388707, 389545, 388757, 415471, 389864
  ) 
  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.00149

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "56.07"
    },
    "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": 40,
        "rows_produced_per_join": 40,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "48.07",
          "eval_cost": "8.00",
          "prefix_cost": "56.07",
          "data_read_per_join": "2K"
        },
        "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 (388565,389843,415733,388825,389050,389512,390315,388667,388724,390230,389353,389076,389570,389180,415522,388707,389545,388757,415471,389864)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
388565 127.52000000
388667 184.48000000
388707 92.86000000
388724 112.67000000
388757 130.00000000
388825 125.05000000
389050 53.24000000
389076 53.24000000
389180 170.86000000
389353 528.00000000
389512 144.76000000
389545 170.00000000
389570 55.00000000
389843 414.48000000
389864 231.00000000
390230 187.00000000
390315 170.50000000
415471 115.81000000
415522 181.33000000
415733 104.00000000