diff --git a/library/PostgresqlSyntax/Parsing.hs b/library/PostgresqlSyntax/Parsing.hs
--- a/library/PostgresqlSyntax/Parsing.hs
+++ b/library/PostgresqlSyntax/Parsing.hs
@@ -336,9 +336,17 @@
 sharedSelectNoParens with = do
   select <- selectClause
   sort <- optional (space1 *> sortClause)
-  limit <- optional (space1 *> selectLimit)
-  forLocking <- optional (space1 *> forLockingClause)
+  (limit, forLocking) <- limitFirst <|> forLockingFirst <|> pure (Nothing, Nothing)
   return (SelectNoParens with select sort limit forLocking)
+  where
+    limitFirst = do
+      limit <- space1 *> selectLimit
+      forLocking <- optional (space1 *> forLockingClause)
+      pure (Just limit, forLocking)
+    forLockingFirst = do
+      forLocking <- space1 *> forLockingClause
+      limit <- optional (space1 *> selectLimit)
+      pure (limit, Just forLocking)
 
 -- |
 -- The one that doesn't start with \"WITH\".
@@ -1149,7 +1157,9 @@
       AllSubType <$ keyword "all"
     ]
 
-inExpr = SelectInExpr <$> wrapToHead selectWithParens <|> ExprListInExpr <$> inParens exprList
+inExpr =
+  (ExprListInExpr <$> parse (Megaparsec.try (toParsec (inParens exprList))))
+    <|> (SelectInExpr <$> wrapToHead selectWithParens)
 
 symbolicBinOpExpr a bParser constr = do
   binOp <- label "binary operator" (space *> wrapToHead symbolicExprBinOp <* space)
diff --git a/postgresql-syntax.cabal b/postgresql-syntax.cabal
--- a/postgresql-syntax.cabal
+++ b/postgresql-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: postgresql-syntax
-version: 0.4.3
+version: 0.4.3.1
 category: Database, PostgreSQL, Parsing
 synopsis: PostgreSQL AST parsing and rendering
 description:
diff --git a/tasty-test/Main.hs b/tasty-test/Main.hs
--- a/tasty-test/Main.hs
+++ b/tasty-test/Main.hs
@@ -26,7 +26,17 @@
                       \inner join edgenode.usere_provider as p\n\
                       \on u.id = p.user_id\n\
                       \inner join edgenode.provider_branch as b\n\
-                      \on b.provider_fk = p.provider_id"
+                      \on b.provider_fk = p.provider_id",
+                      -- FOR locking clause before LIMIT (PostgreSQL accepts both orderings)
+                      "select * from items for update limit 1",
+                      "select * from items limit 1 for update",
+                      "select * from items for share limit 10",
+                      "select * from items for no key update limit 1",
+                      "select * from items for key share limit 1",
+                      "select * from items for update of items nowait limit 1",
+                      "select * from items for update skip locked limit 1",
+                      "select * from items order by id for update limit 1",
+                      "select * from items for update offset 5 limit 10"
                     ],
                   testParserOnAllInputs
                     "typename"
