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 (
    12624, 12625, 12626, 12627, 12628, 12629, 
    12630, 12631, 12632, 12633, 12634, 
    12635, 12636, 12637, 12638, 12639, 
    12640, 12641, 12642, 12643, 12644, 
    12645, 12646, 12647, 12648, 12649, 
    12650, 12651, 12652, 12653
  ) 
  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.00083

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "42.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": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 60,
        "rows_produced_per_join": 60,
        "filtered": "100.00",
        "index_condition": "((`test2_gaseus`.`cscart_product_prices`.`lower_limit` = 1) and (`test2_gaseus`.`cscart_product_prices`.`product_id` in (12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653)) and (`test2_gaseus`.`cscart_product_prices`.`usergroup_id` in (0,1)))",
        "cost_info": {
          "read_cost": "36.01",
          "eval_cost": "6.00",
          "prefix_cost": "42.01",
          "data_read_per_join": "1K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ]
      }
    }
  }
}

Result

product_id price
12624 1597.90000000
12625 1597.90000000
12626 1597.90000000
12627 1597.90000000
12628 1597.90000000
12629 1597.90000000
12630 1597.90000000
12631 1597.90000000
12632 1597.90000000
12633 1597.90000000
12634 2376.30000000
12635 2376.30000000
12636 2376.30000000
12637 2376.30000000
12638 2376.30000000
12639 2376.30000000
12640 2376.30000000
12641 2376.30000000
12642 2376.30000000
12643 2376.30000000
12644 2376.30000000
12645 2376.30000000
12646 2376.30000000
12647 2376.30000000
12648 2376.30000000
12649 2376.30000000
12650 2376.30000000
12651 2376.30000000
12652 2376.30000000
12653 2376.30000000