timeout is a timeout for acquiring the lock, not for the callback
@override Future<T> lock<T>(Future<T> Function() callback, {Duration? timeout}) { throw UnimplementedError(); }