Instead of getting all terms, looping over them and then searching your array, you can use the has_term
conditinal tag ex:
if( has_term( 'z', 'product_cat',$post->ID ) ) {
?>
<div id="post-timer">
<p class="timebuy">Time Left To Buy:</p>
<div id="timer-wrap">
<?php echo do_shortcode( '[tminus cid ="12" omitweeks="true" days=" " hours=" " minutes=" " seconds=" "/]' ); ?>
</div><!--end timer-wrap-->
</div><!--end post-timer-->
<?php
}