UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R93JMNKiXuqRgV5jiFh8iWGp8O4xL7Tw/aV7UnAZ2W0=' 
WHERE 
  key_id = 'eeb2da92d8ddfb4e0584d6be73c3323c7b643d7c1ec901e91f906bc8c60667fd' 
  AND (
    token = 'R93JMNKiXuqRgV5jiFh8iWGp8O4xL7Tw/aV7UnAZ2W0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035