In that case, you just need to negate the WHERE condition for the "else" branch:
1: UPDATE aspnet_Membership
2: SET IsLockedOut = 1
3: FROM
4: aspnet_Users au Left Outer Join
5: Users u On au.UserName = u.Username Inner Join
6: UserRoles ur On u.UserID = ur.UserID Inner Join
7: aspnet_Membership am On au.UserId = am.UserId
8: WHERE
9: NOT (DateDiff(day, ur.ExpiryDate, GetDate()) Between -1 And 0
10: AND DateDiff(day, am.LastPasswordChangedDate, GetDate()) < 14)
11:
12: UPDATE UserRoles
13: SET ExpiryDate = DATEADD(year, 1, ur.ExpiryDate)
14: FROM
15: aspnet_Users au Left Outer Join
16: Users u On au.UserName = u.Username Inner Join
17: UserRoles ur On u.UserID = ur.UserID Inner Join
18: aspnet_Membership am On au.UserId = am.UserId
19: WHERE
20: DateDiff(day, ur.ExpiryDate, GetDate()) Between -1 And 0
21: AND DateDiff(day, am.LastPasswordChangedDate, GetDate()) < 14
You'll also need to run the "else" branch first, since the other branch updates ExpiryDate (invalidating the WHERE condition)
Hope it helps,