Doesn’t set_transient() add multiple rows with the same key?

No: each transient will need a unique name. Per the documentation:

If a transient exists, this function will update the transient’s expiration time.