It's not entirely the same thing, yet the outcome will still be what you want it to be I think. I'm mostly curious to how (IF!?) this might affect the performance.
UPDATE posts
SET category_id = (
SELECT pkw.keyword_id
FROM post_keywords pkw
JOIN (
SELECT keyword_id, cnt = COUNT(*)
FROM post_keywords
GROUP BY keyword_id ) cnts
ON cnts.keyword_id = pkw.keyword_id
WHERE pkw.id_post = posts.id_post
ORDER BY cnt DESC
LIMIT 0,1
)