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 (
    12554, 12555, 12556, 12557, 12558, 12559, 
    12560, 12561, 12562, 12563, 12564, 
    12565, 12566, 12567, 12568, 12569, 
    12570, 12571, 12572, 12573, 12574, 
    12575, 12576, 12577, 12578, 12579, 
    12580, 12581, 12582, 12583, 12584, 
    12585, 12586, 12587, 12588, 12589, 
    12590, 12591, 12592, 12593
  ) 
  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.00133

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "28.01"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "product_id",
        "used_key_parts": [
          "product_id"
        ],
        "key_length": "3",
        "rows_examined_per_scan": 40,
        "rows_produced_per_join": 7,
        "filtered": "19.99",
        "index_condition": "(`test2_gaseus`.`cscart_product_prices`.`product_id` in (12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12590,12591,12592,12593))",
        "cost_info": {
          "read_cost": "27.21",
          "eval_cost": "0.80",
          "prefix_cost": "28.01",
          "data_read_per_join": "191"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`test2_gaseus`.`cscart_product_prices`.`lower_limit` = 1) and (`test2_gaseus`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
12554 864.90000000
12555 864.90000000
12556 864.90000000
12557 864.90000000
12558 864.90000000
12559 864.90000000
12560 864.90000000
12561 864.90000000
12562 864.90000000
12563 864.90000000
12564 864.90000000
12565 864.90000000
12566 864.90000000
12567 864.90000000
12568 864.90000000
12569 512.50000000
12570 512.50000000
12571 512.50000000
12572 512.50000000
12573 512.50000000
12574 512.50000000
12575 512.50000000
12576 512.50000000
12577 512.50000000
12578 512.50000000
12579 512.50000000
12580 512.50000000
12581 512.50000000
12582 512.50000000
12583 512.50000000
12584 864.90000000
12585 864.90000000
12586 864.90000000
12587 864.90000000
12588 864.90000000
12589 864.90000000
12590 864.90000000
12591 864.90000000
12592 864.90000000
12593 864.90000000