UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '89BBCqt166/7/cpcU6htcnDaPn/Dp+8WA4DtJ1/EPtw=' 
WHERE 
  key_id = 'edf51a04392e9205df45d6509c1ea2a903658f9fd3cd53403b0673ccac3437e9' 
  AND (
    token = '89BBCqt166/7/cpcU6htcnDaPn/Dp+8WA4DtJ1/EPtw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044