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 (
    350338, 352750, 353135, 353755, 358653, 
    350063, 350891, 353573, 354233, 354557, 
    355013, 357118, 357303, 358590, 351072, 
    351228, 352097, 352904, 352962, 354288, 
    356454, 350162, 351229, 351544, 351553, 
    354141, 356403, 357959, 350158, 350234, 
    350694, 350791, 350930, 353432, 354069, 
    355749, 357856, 359081, 350581, 350754, 
    352145, 353373, 356087, 358897, 352105, 
    355630, 356847, 356938, 357320, 358940, 
    350072, 352018, 352381, 353444, 354005, 
    354119, 355550, 349950, 351063, 351145, 
    356295, 356513, 358952, 351062, 352101, 
    352686, 354643, 356626, 356637, 359095, 
    350636, 353246, 353445, 356188, 356931, 
    357166, 357702, 349961, 352824, 354391, 
    355180, 357066, 350340, 350494, 351100, 
    353419, 355235, 357310, 357415, 349868, 
    351452, 352935, 353340, 355823, 355895, 
    356920, 356966, 349849, 350265, 350512
  ) 
  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.00250

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "280.31"
    },
    "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": 200,
        "rows_produced_per_join": 200,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "240.31",
          "eval_cost": "40.00",
          "prefix_cost": "280.31",
          "data_read_per_join": "12K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (350338,352750,353135,353755,358653,350063,350891,353573,354233,354557,355013,357118,357303,358590,351072,351228,352097,352904,352962,354288,356454,350162,351229,351544,351553,354141,356403,357959,350158,350234,350694,350791,350930,353432,354069,355749,357856,359081,350581,350754,352145,353373,356087,358897,352105,355630,356847,356938,357320,358940,350072,352018,352381,353444,354005,354119,355550,349950,351063,351145,356295,356513,358952,351062,352101,352686,354643,356626,356637,359095,350636,353246,353445,356188,356931,357166,357702,349961,352824,354391,355180,357066,350340,350494,351100,353419,355235,357310,357415,349868,351452,352935,353340,355823,355895,356920,356966,349849,350265,350512)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
349849 3.54000000
349868 2.52000000
349950 8.30000000
349961 9.15000000
350063 0.82000000
350072 4.73000000
350158 1.33000000
350162 1.22000000
350234 2.69000000
350265 2.18000000
350338 8.47000000
350340 3.71000000
350494 23.04000000
350512 38.85000000
350581 6.26000000
350636 3.37000000
350694 1.26000000
350754 8.30000000
350791 3.37000000
350891 7.11000000
350930 5.75000000
351062 1.22000000
351063 1.50000000
351072 2.01000000
351100 11.70000000
351145 4.73000000
351228 38.85000000
351229 23.55000000
351452 1.26000000
351544 9.32000000
351553 1.22000000
352018 1.33000000
352097 4.05000000
352101 3.88000000
352105 4.05000000
352145 3.71000000
352381 12.21000000
352686 13.57000000
352750 38.85000000
352824 81.35000000
352904 71.15000000
352935 35.45000000
352962 140.85000000
353135 219.05000000
353246 191.85000000
353340 202.05000000
353373 83.05000000
353419 62.65000000
353432 110.25000000
353444 93.25000000
353445 181.65000000
353573 62.65000000
353755 45.65000000
354005 135.75000000
354069 93.25000000
354119 300.65000000
354141 62.65000000
354233 157.85000000
354288 168.05000000
354391 83.05000000
354557 67.75000000
354643 9.66000000
355013 91.55000000
355180 5.41000000
355235 9.49000000
355550 3.88000000
355630 15.27000000
355749 12.72000000
355823 3.20000000
355895 3.54000000
356087 4.05000000
356188 5.24000000
356295 8.47000000
356403 45.65000000
356454 6.26000000
356513 16.29000000
356626 19.64000000
356637 12.04000000
356847 20.15000000
356920 59.25000000
356931 59.25000000
356938 76.25000000
356966 49.05000000
357066 3.03000000
357118 2.45000000
357166 5.07000000
357303 2.52000000
357310 16.12000000
357320 3.20000000
357415 10.17000000
357702 12.72000000
357856 7.96000000
357959 2.35000000
358590 45.65000000
358653 8.47000000
358897 11.87000000
358940 13.35000000
358952 6.26000000
359081 5.75000000
359095 42.25000000