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 (
    16150, 15902, 16716, 16813, 16812, 16849, 
    17017, 16845, 16932, 16888, 16889, 
    15798, 16861, 16862, 16943, 15835, 
    15836, 15839, 15834, 15837, 16881, 
    15844, 16929, 16938, 16937, 16152, 
    16153, 16947, 15912, 15913, 15797, 
    13030, 13029, 15832, 16801, 16798, 
    16800, 16946, 16827, 16826, 16871, 
    16858, 15845, 16345, 15910, 16941, 
    16940, 16939
  ) 
  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.00138

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "66.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": 120,
        "rows_produced_per_join": 17,
        "filtered": "14.40",
        "index_condition": "(`dev_yourmart_co_bw`.`cscart_product_prices`.`product_id` in (16150,15902,16716,16813,16812,16849,17017,16845,16932,16888,16889,15798,16861,16862,16943,15835,15836,15839,15834,15837,16881,15844,16929,16938,16937,16152,16153,16947,15912,15913,15797,13030,13029,15832,16801,16798,16800,16946,16827,16826,16871,16858,15845,16345,15910,16941,16940,16939))",
        "cost_info": {
          "read_cost": "64.28",
          "eval_cost": "1.73",
          "prefix_cost": "66.01",
          "data_read_per_join": "414"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`dev_yourmart_co_bw`.`cscart_product_prices`.`lower_limit` = 1) and (`dev_yourmart_co_bw`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
13029 600.00000000
13030 35.00000000
15797 35.10000000
15798 35.10000000
15832 285.00000000
15834 24.70000000
15835 20.00000000
15836 30.00000000
15837 34.00000000
15839 18.90000000
15844 142.00000000
15845 37.00000000
15902 62.99000000
15910 285.00000000
15912 184.00000000
15913 80.00000000
16150 576.10000000
16152 250.00000000
16153 224.00000000
16345 138.00000000
16716 180.60000000
16798 1056.50000000
16800 1354.30000000
16801 332.90000000
16812 165.70000000
16813 675.14000000
16826 151.47000000
16827 549.10000000
16845 170.02000000
16849 242.90000000
16858 146.90000000
16861 35.30000000
16862 41.30000000
16871 41.57000000
16881 54.60000000
16888 237.10000000
16889 250.70000000
16929 36.90000000
16932 93.50000000
16937 256.30000000
16938 490.17000000
16939 44.86000000
16940 44.86000000
16941 44.86000000
16943 185.20000000
16946 44.90000000
16947 44.90000000
17017 664.80000000