UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+uxZLM3Z1vmwWpJ/dF4iB3pwF0tVdsk090be7bXtnu0=' 
WHERE 
  key_id = '300d87d430d1cf726b63da649476f767049bfc44c5c3df2f5cdb57f4bccbd1e3' 
  AND (
    token = '+uxZLM3Z1vmwWpJ/dF4iB3pwF0tVdsk090be7bXtnu0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033