Since the sequence diagram shows the specific implementation (Client and Server should be: Client and: Server in the diagram), it is difficult to enter factorization. You can use InteractionUse to reuse a sequence fragment, but in this case it will not help, since you have only one message ("check session").
Do not forget that diagrams are types of systems, and especially sequence diagrams - this is viewing a specific transaction. You do not need to show everything on the chart. You do not need to show the “check session” messages in this diagram and use another one to show that the server always checks the session, perhaps with a state diagram.
source share