UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9xJ86AYemgX650FY1XBCMHmLZyrKMMz8TPCV4oZd9s4=' 
WHERE 
  key_id = 'e01540dcfa4f5be3ea79aee39fc754c0a57458d23b5e07aa103bde7c49481cd4' 
  AND (
    token = '9xJ86AYemgX650FY1XBCMHmLZyrKMMz8TPCV4oZd9s4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032