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 (
    12752, 12753, 12754, 12755, 12756, 12757, 
    12758, 12759, 12760, 12761, 12762, 
    12763, 12764, 12765, 12766, 12767, 
    12768, 12769, 12770, 12771, 12772, 
    12773, 12774, 12775, 12776, 12777, 
    12778, 12779, 12780, 12781
  ) 
  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.00119

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 (12752,12753,12754,12755,12756,12757,12758,12759,12760,12761,12762,12763,12764,12765,12766,12767,12768,12769,12770,12771,12772,12773,12774,12775,12776,12777,12778,12779,12780,12781)) 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
12752 12345.00000000
12753 12346.00000000
12754 12347.00000000
12755 12348.00000000
12756 12349.00000000
12757 12350.00000000
12758 12351.00000000
12759 12352.00000000
12760 12353.00000000
12761 12354.00000000
12762 12355.00000000
12763 12356.00000000
12764 12357.00000000
12765 12358.00000000
12766 12359.00000000
12767 12360.00000000
12768 12361.00000000
12769 12362.00000000
12770 12363.00000000
12771 12364.00000000
12772 12365.00000000
12773 12366.00000000
12774 12367.00000000
12775 12368.00000000
12776 12369.00000000
12777 12370.00000000
12778 12371.00000000
12779 12372.00000000
12780 12373.00000000
12781 12374.00000000