SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_destination_products_amount 
WHERE 
  product_id IN (
    51083, 
    51084, 
    22715, 
    51082, 
    51085, 
    51081, 
    51088, 
    51087, 
    22713, 
    51086, 
    51089, 
    51090, 
    51094, 
    51092, 
    51093, 
    22714, 
    51091, 
    51095, 
    51096, 
    51097, 
    51098, 
    51100, 
    51099, 
    22716, 
    51104, 
    51103, 
    22712, 
    51105, 
    51102, 
    51101, 
    51205, 
    51204, 
    51203, 
    51202, 
    125, 
    51209, 
    51208, 
    51207, 
    51206, 
    124, 
    51211, 
    51210, 
    111, 
    51212, 
    144, 
    51215, 
    51214, 
    51213, 
    51444, 
    51445, 
    51446, 
    51447, 
    51220, 
    51219, 
    51218, 
    51217, 
    51216, 
    146, 
    51448, 
    51449, 
    51221, 
    137, 
    51224, 
    51223, 
    51222, 
    51231, 
    51230, 
    51229, 
    51228, 
    51227, 
    51226, 
    51225, 
    109, 
    51232, 
    12, 
    51238, 
    51237, 
    51236, 
    51235, 
    51234, 
    51233, 
    51243, 
    51242, 
    51241, 
    51240, 
    51239, 
    36, 
    51246, 
    51245, 
    51244, 
    35, 
    51248, 
    51247, 
    51253, 
    51252, 
    51251, 
    51250, 
    51249, 
    34, 
    51256, 
    51255, 
    51254, 
    33, 
    51257, 
    32, 
    51258, 
    51265, 
    51264, 
    51263, 
    51262, 
    51261, 
    51260, 
    51259, 
    110, 
    51272, 
    51271, 
    51270, 
    51269, 
    51268, 
    51267, 
    51266, 
    145, 
    51273, 
    147, 
    51277, 
    51276, 
    51275, 
    51274, 
    51281, 
    51280, 
    51279, 
    51278, 
    51282, 
    7, 
    51289, 
    51288, 
    51287, 
    51286, 
    51285, 
    51284, 
    51283, 
    8, 
    51294, 
    51293, 
    51292, 
    51291, 
    51290, 
    94
  ) 
  AND destination_id = 116 
  AND storefront_id = 1

Query time 0.00115

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "103.61"
    },
    "table": {
      "table_name": "cscart_warehouses_destination_products_amount",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY",
        "idx_storefront_id"
      ],
      "key": "PRIMARY",
      "used_key_parts": [
        "product_id",
        "destination_id",
        "storefront_id"
      ],
      "key_length": "9",
      "rows_examined_per_scan": 148,
      "rows_produced_per_join": 148,
      "filtered": "100.00",
      "index_condition": "((`test_uchur_k`.`cscart_warehouses_destination_products_amount`.`storefront_id` = 1) and (`test_uchur_k`.`cscart_warehouses_destination_products_amount`.`destination_id` = 116) and (`test_uchur_k`.`cscart_warehouses_destination_products_amount`.`product_id` in (51083,51084,22715,51082,51085,51081,51088,51087,22713,51086,51089,51090,51094,51092,51093,22714,51091,51095,51096,51097,51098,51100,51099,22716,51104,51103,22712,51105,51102,51101,51205,51204,51203,51202,125,51209,51208,51207,51206,124,51211,51210,111,51212,144,51215,51214,51213,51444,51445,51446,51447,51220,51219,51218,51217,51216,146,51448,51449,51221,137,51224,51223,51222,51231,51230,51229,51228,51227,51226,51225,109,51232,12,51238,51237,51236,51235,51234,51233,51243,51242,51241,51240,51239,36,51246,51245,51244,35,51248,51247,51253,51252,51251,51250,51249,34,51256,51255,51254,33,51257,32,51258,51265,51264,51263,51262,51261,51260,51259,110,51272,51271,51270,51269,51268,51267,51266,145,51273,147,51277,51276,51275,51274,51281,51280,51279,51278,51282,7,51289,51288,51287,51286,51285,51284,51283,8,51294,51293,51292,51291,51290,94)))",
      "cost_info": {
        "read_cost": "88.81",
        "eval_cost": "14.80",
        "prefix_cost": "103.61",
        "data_read_per_join": "2K"
      },
      "used_columns": [
        "destination_id",
        "storefront_id",
        "product_id",
        "amount"
      ]
    }
  }
}

Result

product_id amount
7 2
8 3
12 3
32 1
33 2
34 3
35 3
36 3
94 1
109 3
110 3
111 1
124 7
125 6
137 1
144 4
145 4
146 4
147 2
22712 5
22713 4
22714 4
22715 2
22716 5
51081 8
51082 8
51083 3
51084 0
51085 1
51086 7
51087 7
51088 4
51089 2
51090 1
51091 7
51092 3
51093 6
51094 0
51095 1
51096 8
51097 8
51098 5
51099 2
51100 2
51101 8
51102 6
51103 5
51104 0
51105 2
51202 5
51203 9
51204 6
51205 3
51206 5
51207 9
51208 4
51209 3
51210 0
51211 0
51212 1
51213 5
51214 3
51215 3
51216 4
51217 6
51218 4
51219 3
51220 3
51221 1
51222 0
51223 1
51224 1
51225 2
51226 5
51227 5
51228 2
51229 2
51230 1
51231 2
51232 5
51233 6
51234 3
51235 2
51236 3
51237 1
51238 1
51239 3
51240 2
51241 2
51242 2
51243 1
51244 6
51245 6
51246 2
51247 2
51248 2
51249 3
51250 2
51251 3
51252 1
51253 2
51254 2
51255 1
51256 2
51257 0
51258 0
51259 4
51260 8
51261 5
51262 2
51263 4
51264 3
51265 3
51266 6
51267 6
51268 6
51269 2
51270 4
51271 4
51272 4
51273 4
51274 5
51275 2
51276 2
51277 1
51278 4
51279 5
51280 3
51281 2
51282 1
51283 4
51284 6
51285 3
51286 1
51287 3
51288 3
51289 3
51290 1
51291 1
51292 0
51293 1
51294 1
51444 5
51445 1
51446 3
51447 2
51448 6
51449 2