SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_destination_products_amount 
WHERE 
  product_id IN (
    4, 
    6, 
    7, 
    8, 
    9, 
    10, 
    12, 
    13, 
    14, 
    15, 
    16, 
    19, 
    20, 
    23, 
    27, 
    32, 
    33, 
    34, 
    35, 
    36, 
    42, 
    52, 
    54, 
    59, 
    60, 
    61, 
    62, 
    63, 
    84, 
    85, 
    86, 
    89, 
    93, 
    94, 
    95, 
    107, 
    108, 
    109, 
    110, 
    111, 
    113, 
    114, 
    118, 
    120, 
    121, 
    123, 
    127, 
    128, 
    130, 
    131, 
    134, 
    136, 
    141, 
    142, 
    144, 
    145, 
    146, 
    147, 
    50984, 
    50985, 
    50986, 
    50988, 
    50992, 
    50993, 
    51106, 
    51107, 
    51108, 
    51109, 
    51110, 
    51111, 
    51112, 
    51113, 
    51114, 
    51115, 
    51116, 
    51117, 
    51118, 
    51161, 
    51162, 
    51163, 
    51164, 
    51165, 
    51177, 
    51178, 
    51179, 
    51180, 
    51181, 
    51182, 
    51183, 
    51184, 
    51185, 
    51186, 
    51187, 
    51188, 
    51189, 
    51190, 
    51191, 
    51192, 
    51193, 
    51194, 
    51195, 
    51196, 
    51197, 
    51198, 
    51199, 
    51200, 
    51201, 
    51210, 
    51211, 
    51212, 
    51213, 
    51214, 
    51215, 
    51216, 
    51217, 
    51218, 
    51219, 
    51220, 
    51225, 
    51226, 
    51227, 
    51228, 
    51229, 
    51230, 
    51231, 
    51232, 
    51233, 
    51234, 
    51235, 
    51236, 
    51237, 
    51238, 
    51239, 
    51240, 
    51241, 
    51242, 
    51243, 
    51244, 
    51245, 
    51246, 
    51247, 
    51248, 
    51249, 
    51250, 
    51251, 
    51252, 
    51253, 
    51254, 
    51255, 
    51256, 
    51257, 
    51258, 
    51259, 
    51260, 
    51261, 
    51262, 
    51263, 
    51264, 
    51265, 
    51266, 
    51267, 
    51268, 
    51269, 
    51270, 
    51271, 
    51272, 
    51273, 
    51274, 
    51275, 
    51276, 
    51277, 
    51278, 
    51279, 
    51280, 
    51281, 
    51282, 
    51283, 
    51284, 
    51285, 
    51286, 
    51287, 
    51288, 
    51289, 
    51290, 
    51291, 
    51292, 
    51293, 
    51294, 
    51310, 
    51311, 
    51312, 
    51313, 
    51314, 
    51325, 
    51327, 
    51328, 
    51329, 
    51330, 
    51331, 
    51332, 
    51336, 
    51337, 
    51338, 
    51339, 
    51344, 
    51346, 
    51347, 
    51348, 
    51350, 
    51374, 
    51375, 
    51376, 
    51377, 
    51378, 
    51379, 
    51380, 
    51381, 
    51382, 
    51390, 
    51391, 
    51392, 
    51393, 
    51394, 
    51444, 
    51445, 
    51446, 
    51447, 
    51448, 
    51449, 
    51450, 
    51451
  ) 
  AND destination_id = 116 
  AND storefront_id = 1

Query time 0.00315

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "156.71"
    },
    "table": {
      "table_name": "cscart_warehouses_destination_products_amount",
      "access_type": "ref",
      "possible_keys": [
        "PRIMARY",
        "idx_storefront_id"
      ],
      "key": "idx_storefront_id",
      "used_key_parts": [
        "storefront_id"
      ],
      "key_length": "3",
      "ref": [
        "const"
      ],
      "rows_examined_per_scan": 1516,
      "rows_produced_per_join": 75,
      "filtered": "5.00",
      "cost_info": {
        "read_cost": "5.11",
        "eval_cost": "7.58",
        "prefix_cost": "156.71",
        "data_read_per_join": "1K"
      },
      "used_columns": [
        "destination_id",
        "storefront_id",
        "product_id",
        "amount"
      ],
      "attached_condition": "((`test_uchur_k`.`cscart_warehouses_destination_products_amount`.`destination_id` = 116) and (`test_uchur_k`.`cscart_warehouses_destination_products_amount`.`product_id` in (4,6,7,8,9,10,12,13,14,15,16,19,20,23,27,32,33,34,35,36,42,52,54,59,60,61,62,63,84,85,86,89,93,94,95,107,108,109,110,111,113,114,118,120,121,123,127,128,130,131,134,136,141,142,144,145,146,147,50984,50985,50986,50988,50992,50993,51106,51107,51108,51109,51110,51111,51112,51113,51114,51115,51116,51117,51118,51161,51162,51163,51164,51165,51177,51178,51179,51180,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,51195,51196,51197,51198,51199,51200,51201,51210,51211,51212,51213,51214,51215,51216,51217,51218,51219,51220,51225,51226,51227,51228,51229,51230,51231,51232,51233,51234,51235,51236,51237,51238,51239,51240,51241,51242,51243,51244,51245,51246,51247,51248,51249,51250,51251,51252,51253,51254,51255,51256,51257,51258,51259,51260,51261,51262,51263,51264,51265,51266,51267,51268,51269,51270,51271,51272,51273,51274,51275,51276,51277,51278,51279,51280,51281,51282,51283,51284,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51310,51311,51312,51313,51314,51325,51327,51328,51329,51330,51331,51332,51336,51337,51338,51339,51344,51346,51347,51348,51350,51374,51375,51376,51377,51378,51379,51380,51381,51382,51390,51391,51392,51393,51394,51444,51445,51446,51447,51448,51449,51450,51451)))"
    }
  }
}

Result

product_id amount
50993 6
50988 6
50986 10
50985 6
51394 1
51393 3
51392 7
51391 6
51390 8
51382 6
51381 6
51380 5
51379 5
51378 4
51377 2
51376 3
51375 6
51374 6
50992 6
51350 20
51348 10
51347 46
51346 10
51344 15
51339 6
51338 10
51337 10
51336 10
51332 10
51331 10
51330 10
51329 6
51328 10
51327 10
50984 1
51325 1
51314 3
51313 5
51312 4
51311 4
51310 3
51198 3
51197 4
51196 4
51191 6
51260 8
51261 5
51262 2
51263 4
51264 3
51269 2
51270 4
51271 4
51272 4
51265 3
51266 6
51267 6
51268 6
51273 4
51274 5
51275 2
51276 2
51277 1
51278 4
51279 5
51280 3
51281 2
51195 2
51194 2
51193 3
51192 6
51239 3
51240 2
51241 2
51117 2
51118 1
51106 1
51177 1
51178 1
51249 3
51250 2
51285 3
51286 1
51287 3
51288 3
51289 3
51290 1
51291 1
51292 0
51293 1
51294 1
51259 4
51256 2
51257 0
51258 0
51252 1
51253 2
51254 2
51255 1
51199 3
51200 3
51201 1
51212 1
51213 5
51214 3
51215 3
51242 2
51210 0
51211 0
51216 4
51217 6
51218 4
51107 3
51108 3
51109 2
51110 2
51111 1
51112 1
51113 2
51114 2
51115 3
51116 2
51225 2
51226 5
51227 5
51228 2
51234 3
51235 2
51236 3
51237 1
51238 1
51229 2
51230 1
51231 2
51232 5
51233 6
51161 2
51162 3
51163 1
51243 1
51244 6
51245 6
51219 3
51220 3
51189 3
51188 2
51190 6
51179 1
51180 1
51251 3
51247 2
51248 2
51246 2
51181 0
51182 1
51282 1
51283 4
51284 6
51183 1
51184 3
51185 5
51186 4
51187 2
51164 1
51165 1
8 3
20 2
34 3
36 3
19 3
35 3
52 2
12 3
109 3
128 3
16 23
146 4
13 20
14 29
23 19
27 4
141 11
62 20
60 29
111 1
144 4
10 38
33 2
110 3
32 1
59 14
142 12
9 36
94 1
93 1
130 2
131 2
7 2
145 4
147 2
54 3
127 3
63 5
113 37
86 27
120 25
118 20
114 25
108 10
4 15
107 17
84 18
85 70
6 29
121 22
61 12
123 21
15 31
95 13
136 13
42 5
89 8
134 2
51444 5
51445 1
51446 3
51447 2
51448 6
51449 2
51450 3
51451 3