This code here:
(code = '2222' AND cast(percentage as float)/100 < 0.50)
OR (code = '3333')
That second piece of the OR (code = '3333') is allowing for results that are greater than 0.50
The way you have your where clause written right now it shows you any results that have code = '3333' and only results that have code = '2222' that are less than 0.50