SELECT 
  q_product_prices.product_id, 
  MIN(
    IF(
      q_product_prices.percentage_discount = 0, 
      q_product_prices.price, 
      q_product_prices.price - (
        q_product_prices.price * q_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  q_product_prices 
WHERE 
  q_product_prices.product_id IN (
    6950, 6951, 6952, 6953, 6954, 6955, 6956, 
    6112, 6113, 6114, 6115, 6116, 6117, 
    6118, 6119, 6120, 6121, 6122, 6123, 
    6124, 6125, 6126, 6127, 6128, 6129, 
    6130, 6131, 6132, 6133, 6134, 6135, 
    6136
  ) 
  AND q_product_prices.lower_limit = 1 
  AND q_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  q_product_prices.product_id

Query time 0.00087

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "76.81"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "q_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": 32,
        "rows_produced_per_join": 6,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (6950,6951,6952,6953,6954,6955,6956,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,6132,6133,6134,6135,6136))",
        "cost_info": {
          "read_cost": "75.53",
          "eval_cost": "1.28",
          "prefix_cost": "76.81",
          "data_read_per_join": "153"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`portal`.`q_product_prices`.`lower_limit` = 1) and (`portal`.`q_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
6112 55.000000
6113 69.000000
6114 95.000000
6115 69.000000
6116 105.000000
6117 79.000000
6118 79.000000
6119 65.000000
6120 29.000000
6121 39.000000
6122 45.000000
6123 45.000000
6124 29.000000
6125 55.000000
6126 55.000000
6127 135.000000
6128 85.000000
6129 44.900000
6130 49.000000
6131 55.000000
6132 42.990000
6133 41.000000
6134 55.000000
6135 69.000000
6136 55.000000
6950 469.000000
6951 105.000000
6952 105.000000
6953 85.000000
6954 119.000000
6955 125.000000
6956 125.000000