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 (
    596382, 590365, 590359, 590343, 590337, 
    590566, 590341, 590335, 590366, 590358, 
    589041, 590364, 590369, 590368, 589374, 
    590348, 1070392, 590356, 590351, 590350, 
    589033, 590755, 1070391, 590355, 588389
  ) 
  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.00209

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "51.32"
    },
    "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": 50,
        "rows_produced_per_join": 50,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "46.32",
          "eval_cost": "5.00",
          "prefix_cost": "51.32",
          "data_read_per_join": "1K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`maniamall_cscart`.`cscart_product_prices`.`lower_limit` = 1) and (`maniamall_cscart`.`cscart_product_prices`.`product_id` in (596382,590365,590359,590343,590337,590566,590341,590335,590366,590358,589041,590364,590369,590368,589374,590348,1070392,590356,590351,590350,589033,590755,1070391,590355,588389)) and (`maniamall_cscart`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
588389 37.500000
589033 105.630000
589041 123.500000
589374 18.750000
590335 7.500000
590337 11.250000
590341 7.500000
590343 7.500000
590348 11.250000
590350 11.250000
590351 11.250000
590355 15.000000
590356 11.250000
590358 3.750000
590359 3.750000
590364 7.500000
590365 7.500000
590366 5.630000
590368 7.500000
590369 7.500000
590566 165.000000
590755 70.880000
596382 42.500000
1070391 3.750000
1070392 7.500000