UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vuEfa6PT/P2HYvx+4zu4cSRbud2sNhvLh27pZhtkF64=' 
WHERE 
  key_id = '4b962b17157faabaabdc7983e5c0a1a70c107957030aaff6489addcb04a1af16' 
  AND (
    token = 'vuEfa6PT/P2HYvx+4zu4cSRbud2sNhvLh27pZhtkF64=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035