UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wNvGba7/APYgJz2EyXmdzad3vdNH3CBcP6H2NeCmHQ8=' 
WHERE 
  key_id = '9411bc92d742dcab8b04104539cf06a5078f9783f66d62fabd44fcd1a849ce43' 
  AND (
    token = 'wNvGba7/APYgJz2EyXmdzad3vdNH3CBcP6H2NeCmHQ8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028