I think the easiest way to ensure that this code is only added for a gift certificate is to add some custom code to the page where the binding is set in the add to cart server behavior. We should check that the item is a gift card, if it is then we will add the random value to that column in the cart, otherwise just leave it blank. The code will look something like this:
$ATC_itemCode = (is gift certificate)?WA_RandomPassword(6, false, true, true, ""):"";// column binding
This code is setting the column for the cart to either the random password binding that you configured or "" depending on weather or not the condition in the parenthesis is true. In this example I just have (is gift certificate) this will need to be updated with a legit check of the item to see if it a gift certificate. What criteria do you use to determine if it is a gift certificate? Is it the category?
This is just an example but it would look very similar to this for you. If you can post back with the current line of code from your add to cart that is setting this value and also some info about how you determine if the item is a gift certificate I can help you craft what this line will look like exactly.