Wait time on server replies - Issue with several statements

A problem on one of our production enviroment is the following:
We are able to run a stament for several times in 13 of 14 seconds, after a coiuple of times the execution is suddenly 40 secs, afterwards we can execute the statement again in 13 to 14 seconds.

It shows in trial 4 where the execution time is 49 seconds.
Statements are being executed locally on the database server.

- Indexes have been rebuild, stats have been updated, All data is being extracted from cache

For such cases, it is usually related to what is called Stress powers of your T-SQL query where it can’t afford adequate no of concurrent users or in other words consume huge volume of IO or CPU resources ending up with a culprit point of performance just like you case if no adequate resources are available for its execution ..

I do prefer to read more about that regard at my T-SQL performance Guidelines blogs:

This prompts more the opinion that the query consumes much IO resources which means it will be impacted tangibly if no enough IO resources are available for execution , I do recommend to check the last article regarding index Tuning as perhaps might the query needs for better indexes to mitigate IO cost exists within query execution plan