UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3b/cCgqzGY3HO5NGdrni3K9W2CXUacjp2o9ycAUurLU=' 
WHERE 
  key_id = 'ac26d2ab9573146b2b652d0a66d282dcb8d6d70ce9ee6e622c4f11c710850e41' 
  AND (
    token = '3b/cCgqzGY3HO5NGdrni3K9W2CXUacjp2o9ycAUurLU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033