Lock database in time
You can use set timestamp &lt;unix_epoch&gt; which will make now() be fixed -- always return that value. See https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_timestamp

Note that this will not affect sysdate(). To fix sysdate, you can start MySQL with the --sysdate-is-now option which will make sysdate() return the same value as now(), so in conjunction with above sysdate() will now be fixed. See
  https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_sysdate-is-now

(People coming from the Oracle world know this parameter as fixed_date.)