UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RJVPd/Eb0DIq0feH2X4gD6v9CZeh1IXGrY5xACrWNmg=' 
WHERE 
  key_id = 'e66606a73f4bd8abecb0043bd9770b7ea95845d99b3686fece432126202c1d62' 
  AND (
    token = 'RJVPd/Eb0DIq0feH2X4gD6v9CZeh1IXGrY5xACrWNmg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035