You do not (necessarily) need to improve the performance of your search. What is happening is that your splunkweb (browser) session is expiring due to idleness (disuse). The easiest way to handle this is to click on the Job menu which is on the right side of the screen (actually to the far left of the controls on the right side) above the timeline. Select Send Job to Background. In the dialog that opens, check the Email when complete box and click the Send to Background button. Your search will be backgrounded and then should not expire. When it completes, you will get an email with a link to the results.
How many events are in the data_for_checkprod and currenciesss indexes? What time window are you using? How many indexers do you have? Spreading the work among more indexers should speed the search.
Since the ID, msg, and pos_origin fields are not calculated in any of the eval statements, I assume they are extracted from the events in both indexes. Consider moving the where clause to your base searches. That should reduce the number of events processed and speed the search.
--- If this reply helps you, an upvote would be appreciated.