removeVisitsAfter = async function (timestamp) {
  var release = await lock('history-db')
  try {
    db.serialize()
    db.run('BEGIN TRANSACTION;')
    db.run('DELETE FROM visits WHERE ts >= ?;', timestamp)
    db.run('DELETE FROM visit_stats WHERE last_visit_ts >= ?;', timestamp)
    await db.run('COMMIT;')
  } catch (e) {
    await db.run('ROLLBACK;')
    throw e
  } finally {
    db.parallelize()
    release()
  }
}
@param {number} timestamp
@returns {Promise<void>}