Exercise 1: What the status = 'active' Guard Prevents — Possible Solution ==================================================================== WHAT THE GUARD ACTUALLY DOES ------------------------------ The AND status = 'active' condition in the WHERE clause means the UPDATE only ever touches a row that is currently active - if the row's status is already 'used', the query matches zero rows and changes nothing at all. WHAT WOULD GO WRONG WITHOUT IT ------------------------------ Without that condition, the UPDATE would match the row regardless of its current status. If a user managed to click "Mark Used" twice on the same item - a double-click, a slow network causing a retry, or simply clicking again before the UI updated - the second request would run again and overwrite used_at with a new, later timestamp, even though the item was already genuinely marked used at an earlier, correct moment. The historical record of exactly when the item was actually used would silently become wrong. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly explains that the guard makes the query only affect currently-active rows, and correctly identifies the concrete consequence of omitting it: a second click could overwrite used_at with an incorrect, later timestamp instead of safely doing nothing.