UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eL6pl7f/JiPV//etR6WFKSgNQE5aJcMTbx++/ZomcJs=' 
WHERE 
  key_id = 'ef802aeac3cc1751cc4d588991f60cfeafc76a27c54ee700869f607b250f6bf9' 
  AND (
    token = 'eL6pl7f/JiPV//etR6WFKSgNQE5aJcMTbx++/ZomcJs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059