The following theorem is proved: Let r=r(y)>1, s, and t be non-negative integers. If R is a left s-unital ring satisfies the polynomial identity [xy−xsyrxt,x]=0 for every x,y∈R, then R is commutative. The commutativity of a right s-unital ring satisfying the polynomial identity [xy−yrxt,x]=0 for all x,y∈R, is also proved.