SELECT DISTINCT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `at_product_brand`.`value` AS `product_brand`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=2 AND cat_index.is_parent=1
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
INNER JOIN `catalog_product_entity_varchar` AS `at_product_brand` ON (`at_product_brand`.`entity_id` = `e`.`entity_id`) AND (`at_product_brand`.`attribute_id` = '135') AND (`at_product_brand`.`store_id` = 0)
INNER JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id WHERE (at_product_brand.value = '31') AND (stock_status_index.stock_status = 1) ORDER BY find_in_set(e.entity_id,'2405,32438,32437,32436,32435,32434,32433,32309,32308,32307,32306,32305,32304,32303,32301,32300,32439') ASC, `cat_index`.`position` asc, `e`.`entity_id` DESC
LIMIT 30