Basically, the question is how to convert and and not operators correctly in the given xpath:
"//div[contains(@class, 'cpthead') or contains(@class, 'cptbulkhead') and (not(contains(@class, 'overloaded') or contains(@class, 'loaded')))]"
the answer is :
.cpthead:not(.overloaded):not(.loaded),cptbulkhead:not(.overloaded):not(.loaded)