Ubercart: PHP message if a Product is in cart
Create a block with input format as php code.  uc_cart_get_contents() function will help you to get current cart products. So use it to check for your products.

eg: 

$items = uc_cart_get_contents();
// print_r($items); you can see all items in cart
foreach ($items as $item){
  //check your condition if condition true print your message,
}


Assign the block to a specific region and give display in cart page only