UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6uvnoT5FwzSz/PZcKTIwdMJ+dLDy5bnxtytPl6umm10=' 
WHERE 
  key_id = '45ca966c18236e1bbe4dbef41882e50f5496cf1aaf72a1d5ecee171685c1bcd6' 
  AND (
    token = '6uvnoT5FwzSz/PZcKTIwdMJ+dLDy5bnxtytPl6umm10=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027