UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'gykf8EXFizGBgdhXW4iTjs5tlh4r9/rT7P7ft4Mbkmc=' 
WHERE 
  key_id = '27a17d677b170c21b346ceaa7f89203e5ee4153de58506e0055425326ff92a35' 
  AND (
    token = 'gykf8EXFizGBgdhXW4iTjs5tlh4r9/rT7P7ft4Mbkmc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00071