If you’re coding a custom select posts from database based on arguments and want to exlude a tag or category, then just use tag__not_in to exclude. Done.
$args=array( 'cat'=> '2', 'tag__not_in' => array('45') );
So a working example is something like this:
<?php query_posts(array('tag__in' => array(374), 'tag__not_in' => array('456'))); ?>