SELECT 
  `F`.`path`, 
  `PI`.`product_id`, 
  `PI`.`alt` 
FROM 
  `cscart_products__images` AS `PI` 
  LEFT JOIN `files` AS `F` ON `PI`.`watermark_small_file_id` = `F`.`id` 
WHERE 
  `PI`.`product_id` IN (33221, 9179, 14469, 14718, 33057)

Query time 0.00042

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "11.91"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "PI",
          "access_type": "range",
          "possible_keys": [
            "product_id"
          ],
          "key": "product_id",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "rows_examined_per_scan": 9,
          "rows_produced_per_join": 9,
          "filtered": "100.00",
          "index_condition": "(`dev2`.`PI`.`product_id` in (33221,9179,14469,14718,33057))",
          "cost_info": {
            "read_cost": "4.41",
            "eval_cost": "0.90",
            "prefix_cost": "5.31",
            "data_read_per_join": "288"
          },
          "used_columns": [
            "product_id",
            "watermark_small_file_id",
            "alt"
          ]
        }
      },
      {
        "table": {
          "table_name": "F",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "4",
          "ref": [
            "dev2.PI.watermark_small_file_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 9,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "5.70",
            "eval_cost": "0.90",
            "prefix_cost": "11.91",
            "data_read_per_join": "33K"
          },
          "used_columns": [
            "id",
            "path"
          ]
        }
      }
    ]
  }
}

Result

path product_id alt
https://s3.timeweb.cloud/482029f9-prod/products__images/9179_945656ffd7a1_%D0%9A%D0%9C%D0%A3.webp 9179
https://s3.timeweb.cloud/482029f9-prod/products__images/14469_c8e33d48e49a_32345_15c1b0df2b4a_14469_17b00a12ee03_4_xfmj-7p_esem-ii.webp 14469
https://s3.timeweb.cloud/482029f9-prod/products__images/14718_c1214086fbf9_22046-94875_za8o-li.webp 14718
https://s3.timeweb.cloud/482029f9-prod/products__images/14718_78d5a16148d1_22046-94870_21b0-a4.webp 14718
https://s3.timeweb.cloud/482029f9-prod/products__images/14718_762cf5390cc0_22046-94873_smgi-f4.webp 14718
https://s3.timeweb.cloud/482029f9-prod/products__images/33057_1890f0ff6ba9_33063_6d6634d5838e_0_aa0102988d88_Shacman-6x6-it-150-2jpgwebp 33057
https://s3.timeweb.cloud/482029f9-prod/products__images/33057_4df746a4ad28_33063_a8121a0f7a83_0_ec57248656cc_Shacman-6x6-it-150-1jpgwebp 33057
https://s3.timeweb.cloud/482029f9-prod/products__images/33057_fb1fd352a0db_33063_75d22d3628f9_0_c867ced0162a_Shacman-6x6-it-150-3jpgwebp 33057
https://s3.timeweb.cloud/482029f9-prod/products__images/33221_9172d23097d9_33222_73f156c5a3e7_1jpgwebp 33221