Analysis of optimal lockdown in integral economic–epidemic model